2024-08-25 12:44:14 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
secrets,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-14 15:48:01 +02:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2024-08-25 12:07:50 +02:00
|
|
|
cfg = config.downloads.transmission;
|
2024-07-14 15:48:01 +02:00
|
|
|
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
|
|
|
};
|
2024-07-14 15:48:01 +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";
|
2024-07-14 15:48:01 +02:00
|
|
|
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;
|
2024-07-14 15:48:01 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|