From fd03ea495bd51a7222fe25b3ea489a26e185e7d9 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Thu, 25 Jun 2020 11:30:32 +1000 Subject: [PATCH] Added transmission --- roles/transmission.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/transmission.nix diff --git a/roles/transmission.nix b/roles/transmission.nix new file mode 100644 index 0000000..20863be --- /dev/null +++ b/roles/transmission.nix @@ -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 + +}