ma torrent: set workDir instead of downloadDir
This commit is contained in:
parent
5af2f43844
commit
ce8efbc80b
@ -8,13 +8,13 @@ let
|
|||||||
peer-port = 51412;
|
peer-port = 51412;
|
||||||
web-port = 8112;
|
web-port = 8112;
|
||||||
daemon-port = 58846;
|
daemon-port = 58846;
|
||||||
dl-dir = config.makefu.dl-dir;
|
torrent-dir = config.makefu.dl-dir;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
download = {
|
download = {
|
||||||
name = "download";
|
name = "download";
|
||||||
home = dl-dir;
|
home = torrent-dir;
|
||||||
uid = mkDefault (genid "download");
|
uid = mkDefault (genid "download");
|
||||||
createHome = true;
|
createHome = true;
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
@ -26,9 +26,9 @@ in {
|
|||||||
# todo: race condition, do this after download user has been created
|
# todo: race condition, do this after download user has been created
|
||||||
system.activationScripts."download-dir-chmod" = ''
|
system.activationScripts."download-dir-chmod" = ''
|
||||||
for i in finished watch torrents; do
|
for i in finished watch torrents; do
|
||||||
mkdir -p "${dl-dir}/$i"
|
mkdir -p "${torrent-dir}/$i"
|
||||||
chown download:download "${dl-dir}/$i"
|
chown download:download "${torrent-dir}/$i"
|
||||||
chmod 770 "${dl-dir}/$i"
|
chmod 770 "${torrent-dir}/$i"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -54,9 +54,8 @@ in {
|
|||||||
rutorrent.enable = true;
|
rutorrent.enable = true;
|
||||||
enableXMLRPC = true;
|
enableXMLRPC = true;
|
||||||
listenPort = peer-port;
|
listenPort = peer-port;
|
||||||
downloadDir = dl-dir + "/finished";
|
workDir = torrent-dir;
|
||||||
# dump old torrents into watch folder to have them re-added
|
# dump old torrents into watch folder to have them re-added
|
||||||
watchDir = dl-dir +"/watch";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user