diff options
author | makefu <makefu@tsp> | 2015-08-14 14:00:18 +0000 |
---|---|---|
committer | makefu <makefu@tsp> | 2015-08-14 14:00:18 +0000 |
commit | d35de37b0d2b9d5d567a530726aa01f2ec686bf3 (patch) | |
tree | 8bcccdb27a1c0087668cd9d63bb294e71f4cb79a /lass/2configs/downloading.nix | |
parent | c36ea0e029772649e33a727a9be15986cbb1fed2 (diff) | |
parent | b8b2575d8313cfd0696a121cee1b8738faff6638 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'lass/2configs/downloading.nix')
-rw-r--r-- | lass/2configs/downloading.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/lass/2configs/downloading.nix b/lass/2configs/downloading.nix new file mode 100644 index 000000000..e6d31a6c4 --- /dev/null +++ b/lass/2configs/downloading.nix @@ -0,0 +1,67 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../3modules/iptables.nix + ../3modules/folderPerms.nix + ]; + + users.extraUsers = { + download = { + name = "download"; + home = "/var/download"; + createHome = true; + extraGroups = [ + "download" + ]; + }; + + transmission = { + extraGroups = [ + "download" + ]; + }; + }; + + users.extraGroups = { + download = { + members = [ + "download" + "transmission" + ]; + }; + }; + + services.transmission = { + enable = true; + settings = { + download-dir = "/var/download/finished"; + incomplete-dir = "/var/download/incoming"; + incomplete-dir-enabled = true; + + rpc-authentication-required = true; + rpc-whitelist-enabled = false; + rpc-username = "download"; + #add rpc-password in secrets + rpc-password = "test123"; + }; + }; + + lass.iptables = { + enable = true; + tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 9091"; target = "ACCEPT"; } + ]; + }; + + lass.folderPerms = { + enable = true; + permissions = [ + { + path = "/var/download"; + permission = "775"; + owner = "transmission:download"; + } + ]; + }; +} |