Skip to content

Commit

Permalink
aria2 (nixos): actually load the module
Browse files Browse the repository at this point in the history
Fixes #33991
  • Loading branch information
peterhoeg committed Jan 31, 2018
1 parent 5097e84 commit dc52fc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -425,6 +425,7 @@
./services/network-filesystems/yandex-disk.nix
./services/network-filesystems/xtreemfs.nix
./services/networking/amuled.nix
./services/networking/aria2.nix
./services/networking/asterisk.nix
./services/networking/atftpd.nix
./services/networking/avahi-daemon.nix
Expand Down
10 changes: 5 additions & 5 deletions nixos/modules/services/networking/aria2.nix
Expand Up @@ -10,9 +10,9 @@ let
settingsDir = "${homeDir}";
sessionFile = "${homeDir}/aria2.session";
downloadDir = "${homeDir}/Downloads";

rangesToStringList = map (x: builtins.toString x.from +"-"+ builtins.toString x.to);

settingsFile = pkgs.writeText "aria2.conf"
''
dir=${cfg.downloadDir}
Expand Down Expand Up @@ -110,12 +110,12 @@ in
mkdir -m 0770 -p "${homeDir}"
chown aria2:aria2 "${homeDir}"
if [[ ! -d "${config.services.aria2.downloadDir}" ]]
then
then
mkdir -m 0770 -p "${config.services.aria2.downloadDir}"
chown aria2:aria2 "${config.services.aria2.downloadDir}"
fi
if [[ ! -e "${sessionFile}" ]]
then
then
touch "${sessionFile}"
chown aria2:aria2 "${sessionFile}"
fi
Expand All @@ -132,4 +132,4 @@ in
};
};
};
}
}

0 comments on commit dc52fc6

Please sign in to comment.