nixos/i2pd: add module package option

This commit is contained in:
Jesper Geertsen Jonsson 2021-12-04 13:38:05 +01:00
parent 028f8c7625
commit 9268da6b04

View file

@ -224,7 +224,7 @@ let
i2pdSh = pkgs.writeScriptBin "i2pd" '' i2pdSh = pkgs.writeScriptBin "i2pd" ''
#!/bin/sh #!/bin/sh
exec ${pkgs.i2pd}/bin/i2pd \ exec ${cfg.package}/bin/i2pd \
${if cfg.address == null then "" else "--host="+cfg.address} \ ${if cfg.address == null then "" else "--host="+cfg.address} \
--service \ --service \
--conf=${i2pdConf} \ --conf=${i2pdConf} \
@ -253,6 +253,15 @@ in
''; '';
}; };
package = mkOption {
type = types.package;
default = pkgs.i2pd;
defaultText = literalExpression "pkgs.i2pd";
description = ''
i2pd package to use.
'';
};
logLevel = mkOption { logLevel = mkOption {
type = types.enum ["debug" "info" "warn" "error"]; type = types.enum ["debug" "info" "warn" "error"];
default = "error"; default = "error";