configuration.nix/hosts/layne/services/apps/transmission.nix

58 lines
1.6 KiB
Nix
Raw Normal View History

2024-09-14 19:36:59 +05:30
{ pkgs, ... }:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
in
{
2024-07-17 10:45:56 +05:30
services = {
caddy = {
virtualHosts."transmission.labs.adtya.xyz" = {
2024-09-14 19:36:59 +05:30
logFormat = logFormat "transmission.labs.adtya.xyz";
2024-07-17 10:45:56 +05:30
extraConfig = ''
reverse_proxy 127.0.0.1:9091
2024-07-17 10:45:56 +05:30
'';
};
};
transmission = {
user = "mediaserver";
group = "mediaserver";
2024-07-17 10:45:56 +05:30
enable = true;
package = pkgs.transmission_4;
downloadDirPermissions = "775";
home = "/mnt/data/Torrents";
webHome = pkgs.flood-for-transmission;
openPeerPorts = true;
extraFlags = [
"--encryption-required"
"--no-portmap"
"--dht"
"--lpd"
];
settings = {
peer-port = 51515;
rpc-bind-address = "127.0.0.1";
2024-07-17 10:45:56 +05:30
rpc-port = 9091;
rpc-host-whitelist = "transmission.labs.adtya.xyz";
2024-07-17 10:45:56 +05:30
watch-dir-enabled = true;
preallocation = 2;
alt-speed-time-enabled = true;
alt-speed-time-begin = 360; # 6AM
alt-speed-time-end = 1320; # 10PM
alt-speed-time-day = 127; # 1111111 (Everyday)
alt-speed-down = 10240;
alt-speed-up = 8192;
speed-limit-down-enabled = true;
speed-limit-down = 20480;
speed-limit-up-enabled = true;
speed-limit-up = 16384;
idle-seeding-limit-enabled = true;
idle-seeding-limit = 1440;
ratio-limit-enabled = true;
ratio-limit = 3;
download-queue-enabled = false;
seed-queue-enabled = false;
2024-07-17 10:45:56 +05:30
};
2024-07-04 01:13:49 +05:30
};
};
systemd.services.transmission.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
2024-07-04 01:13:49 +05:30
}