From 183e3912568d2afca843f46aaae59cf1691ab8ab Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 21 May 2022 17:06:28 +0200 Subject: [PATCH] nixos/zeronet: add package option --- nixos/modules/services/networking/zeronet.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/zeronet.nix b/nixos/modules/services/networking/zeronet.nix index dd83b7facc11..f1819cbdf305 100644 --- a/nixos/modules/services/networking/zeronet.nix +++ b/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}"; }; }; };