Added transmission

This commit is contained in:
Craige McWhirter 2020-06-25 11:30:32 +10:00
parent 82d69c58f5
commit fd03ea495b
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA

24
roles/transmission.nix Normal file
View file

@ -0,0 +1,24 @@
# NixOps configuration for the hosts running Transmission
{ config, pkgs, lib, ... }:
{
services = {
transmission = {
enable = true; # Enable Transmission
};
cron = {
enable = true;
systemCronJobs = [
"55 0 * * * transmission systemctl enable transmission-daemon"
"00 1 * * * transmission systemctl start transmission-daemon"
"00 7 * * * transmission systemctl stop transmission-daemon"
"05 7 * * * transmission systemctl disable transmission-daemon"
];
};
};
networking.firewall.allowedTCPPorts = [ 9091 ]; # Open the required firewall ports
}