dots/modules/nixos/features/copyparty.nix
2025-10-22 01:22:05 +11:00

51 lines
944 B
Nix

{
# keep-sorted start
config,
inputs,
lib,
# keep-sorted end
...
}:
let
port = "5000";
in
{
imports = [ inputs.copyparty.nixosModules.default ];
services = {
copyparty = {
enable = true;
settings = {
z = true;
e2dsa = true;
e2ts = true;
e2vu = true;
p = lib.toInt port;
};
accounts.will.passwordFile = config.age.secrets.copyparty-will.path;
volumes."/" = {
path = "/srv/copyparty";
access = {
r = "*";
A = [ "will" ];
};
};
};
nginx.virtualHosts."copyparty.fi33.buzz" = {
forceSSL = true;
useACMEHost = "fi33.buzz";
locations."/".proxyPass = "http://localhost:${port}";
};
};
# secrets
age.secrets."copyparty-will" = {
file = ../../../secrets/copyparty-will.age;
owner = "copyparty";
};
nixpkgs.overlays = [ inputs.copyparty.overlays.default ];
}