nixos/zeronet: add package option
This commit is contained in:
parent
aa2c22d53f
commit
183e391256
|
@ -19,6 +19,13 @@ in with lib; {
|
||||||
options.services.zeronet = {
|
options.services.zeronet = {
|
||||||
enable = mkEnableOption "zeronet";
|
enable = mkEnableOption "zeronet";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.zeronet;
|
||||||
|
defaultText = literalExpression "pkgs.zeronet";
|
||||||
|
description = "ZeroNet package to use";
|
||||||
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -80,7 +87,7 @@ in with lib; {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = "zeronet";
|
StateDirectory = "zeronet";
|
||||||
SupplementaryGroups = mkIf cfg.tor [ "tor" ];
|
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