34 lines
723 B
Nix
34 lines
723 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"];
|
|
|
|
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
|
|
'';
|
|
};
|
|
}
|