fix deluge additional plugins to take a list of paths to eggs
This commit is contained in:
parent
f4b8be76b6
commit
f471db4e3a
1 changed files with 19 additions and 14 deletions
|
@ -77,9 +77,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
additionalPlugins = lib.mkOption {
|
additionalPlugins = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.path;
|
type = lib.types.listOf lib.types.path;
|
||||||
description = "Location of additional plugins.";
|
description = "Location of additional plugins. Each item in the list must be the path to the directory containing the plugin .egg file.";
|
||||||
default = {};
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
logLevel = lib.mkOption {
|
logLevel = lib.mkOption {
|
||||||
|
@ -144,18 +144,23 @@ in
|
||||||
web.port = cfg.webPort;
|
web.port = cfg.webPort;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.deluged.serviceConfig.ExecStart = lib.mkForce (
|
systemd.services.deluged.serviceConfig.ExecStart = lib.mkForce (lib.concatStringsSep " \\\n " ([
|
||||||
''
|
"${config.services.deluge.package}/bin/deluged"
|
||||||
${config.services.deluge.package}/bin/deluged \
|
"--do-not-daemonize"
|
||||||
--do-not-daemonize \
|
"--config ${config.services.deluge.dataDir}/.config/deluge"
|
||||||
--config ${config.services.deluge.dataDir}/.config/deluge
|
] ++ (lib.optional (!(isNull cfg.logLevel)) "-L ${cfg.logLevel}")
|
||||||
'' +
|
));
|
||||||
(if (isNull cfg.logLevel) then "" else " -L ${cfg.logLevel}")
|
|
||||||
);
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = lib.attrsets.mapAttrsToList (name: path:
|
systemd.tmpfiles.rules =
|
||||||
"L+ ${config.services.deluge.dataDir}/.config/deluge/plugins/${name} - - - - ${path}"
|
let
|
||||||
) cfg.additionalPlugins;
|
plugins = pkgs.symlinkJoin {
|
||||||
|
name = "deluge-plugins";
|
||||||
|
paths = cfg.additionalPlugins;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"L+ ${config.services.deluge.dataDir}/.config/deluge/plugins - - - - ${plugins}"
|
||||||
|
];
|
||||||
|
|
||||||
sops.secrets."deluge/auth" = {
|
sops.secrets."deluge/auth" = {
|
||||||
inherit (cfg) sopsFile;
|
inherit (cfg) sopsFile;
|
||||||
|
|
Loading…
Reference in a new issue