nixos/zeronet: add package option
This commit is contained in:
parent
aa2c22d53f
commit
183e391256
1 changed files with 8 additions and 1 deletions
|
@ -19,6 +19,13 @@ in with lib; {
|
|||
options.services.zeronet = {
|
||||
enable = mkEnableOption "zeronet";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.zeronet;
|
||||
defaultText = literalExpression "pkgs.zeronet";
|
||||
description = "ZeroNet package to use";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||
default = {};
|
||||
|
@ -80,7 +87,7 @@ in with lib; {
|
|||
DynamicUser = true;
|
||||
StateDirectory = "zeronet";
|
||||
SupplementaryGroups = mkIf cfg.tor [ "tor" ];
|
||||
ExecStart = "${pkgs.zeronet}/bin/zeronet --config_file ${configFile}";
|
||||
ExecStart = "${cfg.package}/bin/zeronet --config_file ${configFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue