nixos/zeronet: add package option

main
Francesco Gazzetta 2 years ago committed by Dmitry Kalinkin
parent aa2c22d53f
commit 183e391256
  1. 9
      nixos/modules/services/networking/zeronet.nix

@ -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…
Cancel
Save