nixos/deluge: fix directory creation errors

This commit is contained in:
Aaron Andersen 2019-09-01 10:20:42 -04:00
parent 8034573934
commit c6b3ed4bfc

View File

@ -173,7 +173,11 @@ in {
# Provide a default set of `extraPackages`. # Provide a default set of `extraPackages`.
services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ]; services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ];
systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ] systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group}"
"d '${cfg.dataDir}/.config' 0770 ${cfg.user} ${cfg.group}"
"d '${cfg.dataDir}/.config/deluge' 0770 ${cfg.user} ${cfg.group}"
]
++ optional (cfg.config ? "download_location") ++ optional (cfg.config ? "download_location")
"d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}" "d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}"
++ optional (cfg.config ? "torrentfiles_location") ++ optional (cfg.config ? "torrentfiles_location")
@ -237,7 +241,6 @@ in {
group = cfg.group; group = cfg.group;
uid = config.ids.uids.deluge; uid = config.ids.uids.deluge;
home = cfg.dataDir; home = cfg.dataDir;
createHome = true;
description = "Deluge Daemon user"; description = "Deluge Daemon user";
}; };
}; };