nixos/zeronet: add package option

This commit is contained in:
Francesco Gazzetta 2022-05-21 17:06:28 +02:00 committed by Dmitry Kalinkin
parent aa2c22d53f
commit 183e391256

View file

@ -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}";
};
};
};