nix-config/features/server/multimedia/transmission.nix

44 lines
873 B
Nix
Raw Normal View History

2024-08-25 12:44:14 +02:00
{
config,
secrets,
lib,
...
}:
with lib;
let
2024-08-25 12:07:50 +02:00
cfg = config.downloads.transmission;
in
{
2024-07-15 16:55:05 +02:00
options = {
2024-08-25 12:07:50 +02:00
downloads.transmission = {
2024-07-15 16:55:05 +02:00
directory = mkOption {
type = lib.types.str;
default = "/srv/Multimedia";
};
2024-07-15 16:27:23 +02:00
};
};
config = {
2024-08-12 16:13:25 +02:00
sops.secrets.transmission = {
2024-08-25 12:44:14 +02:00
sopsFile = "${secrets}/secrets/transmission.json";
path = "/var/lib/secrets/transmission/settings.json";
};
# torrenting apps
services.transmission = {
enable = true;
openFirewall = true;
openRPCPort = true;
2024-08-12 16:13:25 +02:00
credentialsFile = config.sops.secrets.transmission.path;
settings = {
rpc-bind-address = "0.0.0.0";
rpc-whitelist-enabled = false;
rpc-authentication-required = true;
download-dir = "${cfg.directory}/Torrents";
ratio-limit-enabled = true;
};
};
};
}