diff options
author | makefu <github@syntax-fehler.de> | 2017-12-28 16:10:07 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-12-28 16:10:07 +0100 |
commit | 63e661422289e67d50b645d43964885e574fc665 (patch) | |
tree | 6031849af368ae8b0c73250f64263154eb28b850 /2configs/torrent.nix | |
parent | 1141ea6481668cb78e4251bc51aab7c29e551399 (diff) |
ma torrent: set workDir instead of downloadDir
Diffstat (limited to '2configs/torrent.nix')
-rw-r--r-- | 2configs/torrent.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/2configs/torrent.nix b/2configs/torrent.nix index d063ad3e3..a076479c2 100644 --- a/2configs/torrent.nix +++ b/2configs/torrent.nix @@ -8,13 +8,13 @@ let peer-port = 51412; web-port = 8112; daemon-port = 58846; - dl-dir = config.makefu.dl-dir; + torrent-dir = config.makefu.dl-dir; in { users.users = { download = { name = "download"; - home = dl-dir; + home = torrent-dir; uid = mkDefault (genid "download"); createHome = true; useDefaultShell = true; @@ -26,9 +26,9 @@ in { # todo: race condition, do this after download user has been created system.activationScripts."download-dir-chmod" = '' for i in finished watch torrents; do - mkdir -p "${dl-dir}/$i" - chown download:download "${dl-dir}/$i" - chmod 770 "${dl-dir}/$i" + mkdir -p "${torrent-dir}/$i" + chown download:download "${torrent-dir}/$i" + chmod 770 "${torrent-dir}/$i" done ''; @@ -54,9 +54,8 @@ in { rutorrent.enable = true; enableXMLRPC = true; listenPort = peer-port; - downloadDir = dl-dir + "/finished"; + workDir = torrent-dir; # dump old torrents into watch folder to have them re-added - watchDir = dl-dir +"/watch"; }; networking.firewall.extraCommands = '' |