summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/sabnzbd.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-10-13 20:33:45 +0200
committertv <tv@krebsco.de>2016-10-13 20:33:45 +0200
commit65165f422d8e08f29ec269a3ce98e7ebfa22c622 (patch)
tree13d15f63626129c439840a4b406e3fe4e693096f /makefu/2configs/sabnzbd.nix
parent38d26c551cf3c53151120646a893a13990b21c5c (diff)
parent8458ffd7a00a3e4c734755de7d72f95458d1bb52 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/2configs/sabnzbd.nix')
-rw-r--r--makefu/2configs/sabnzbd.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/makefu/2configs/sabnzbd.nix b/makefu/2configs/sabnzbd.nix
new file mode 100644
index 000000000..6b0f2ac3a
--- /dev/null
+++ b/makefu/2configs/sabnzbd.nix
@@ -0,0 +1,16 @@
+{ pkgs, config, ... }:
+
+with config.krebs.lib;
+let
+ web-port = 8080;
+in {
+ services.sabnzbd.enable = true;
+ services.sabnzbd.group = "download";
+ systemd.services.sabnzbd.environment.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
+
+ users.users.sabnzbd.group = mkForce "download";
+
+ networking.firewall.extraCommands = ''
+ iptables -A INPUT -i retiolum -p tcp --dport ${toString web-port} -j ACCEPT
+ '';
+}