nix-stuff/roles/server/transmission.nix

31 lines
671 B
Nix
Executable file

{ config , ... }:
{
services.transmission = {
enable = true;
openFirewall = true;
settings = {
incomplete-dir-enabled = false;
rpc-bind-address = "0.0.0.0";
rpc-host-whitelist = "everest";
rpc-whitelist = "127.0.0.1";
};
};
# Set up traefik as the reverse proxy for transmission
services.traefik = {
dynamicConfigOptions = {
http = {
routers = {
transmission-subpath = {
rule = "PathPrefix(`/transmission`)";
service = "transmission";
};
};
services.transmission.loadBalancer.servers = [
{ url = "http://localhost:${toString config.services.transmission.settings.rpc-port}"; }
];
};
};
};
}