layne: run transmission over VPN
This commit is contained in:
parent
d7b18d2136
commit
43b7e5f4ef
1 changed files with 20 additions and 1 deletions
|
@ -28,7 +28,7 @@ in
|
||||||
"--lpd"
|
"--lpd"
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
peer-port = 51515;
|
peer-port = 35994;
|
||||||
rpc-bind-address = "127.0.0.1";
|
rpc-bind-address = "127.0.0.1";
|
||||||
rpc-port = 9091;
|
rpc-port = 9091;
|
||||||
rpc-host-whitelist = "transmission.labs.adtya.xyz";
|
rpc-host-whitelist = "transmission.labs.adtya.xyz";
|
||||||
|
@ -54,4 +54,23 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.transmission.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
|
systemd.services.transmission.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
|
||||||
|
systemd.timers.transmission-port-mapping = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*:*:00/30";
|
||||||
|
Unit = "transmission-port-mapping.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.transmission-port-mapping = {
|
||||||
|
script = ''
|
||||||
|
set -eu
|
||||||
|
${pkgs.libnatpmp}/bin/natpmpc -g 10.2.0.1 -a 1 0 tcp 60
|
||||||
|
${pkgs.libnatpmp}/bin/natpmpc -g 10.2.0.1 -a 1 0 udp 60
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue