nix-stuff/roles/server/copyparty.nix

35 lines
793 B
Nix

{flakeSelf, ...}: {
nixpkgs.overlays = [flakeSelf.inputs.copyparty.overlays.default];
services.copyparty = {
enable = true;
settings = {
i = ["unix:770:caddy:/dev/shm/copyparty.socket"];
};
volumes = {
"/Files" = {
path = "/srv/dl";
access.r = "*";
};
};
};
users.users.copyparty.extraGroups = ["caddy"];
programs.rust-motd.settings.service_status.Copyparty = "copyparty";
services.headscale.settings.dns.extra_records = [
{
name = "files.everest.tailscale";
type = "A";
value = "100.100.0.1";
}
];
services.caddy.virtualHosts.copyparty = {
hostName = "files.everest.tailscale";
extraConfig = ''
import tailscale
reverse_proxy unix//dev/shm/copyparty.socket
'';
};
}