nixos/murmur: Add overrideable package switch

This commit is contained in:
Philipp 2021-01-10 17:50:20 +01:00
parent f08bfb8637
commit 06c0f16555
No known key found for this signature in database
GPG Key ID: 2258EE3B85DE1748
1 changed files with 8 additions and 1 deletions

View File

@ -109,6 +109,13 @@ in
description = "Host to bind to. Defaults binding on all addresses."; description = "Host to bind to. Defaults binding on all addresses.";
}; };
package = mkOption {
type = types.package;
default = pkgs.murmur;
defaultText = "pkgs.murmur";
description = "Overridable attribute of the murmur package to use.";
};
password = mkOption { password = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
@ -299,7 +306,7 @@ in
Type = if forking then "forking" else "simple"; Type = if forking then "forking" else "simple";
PIDFile = mkIf forking "/run/murmur/murmurd.pid"; PIDFile = mkIf forking "/run/murmur/murmurd.pid";
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile; EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
ExecStart = "${pkgs.murmur}/bin/murmurd -ini /run/murmur/murmurd.ini"; ExecStart = "${cfg.package}/bin/murmurd -ini /run/murmur/murmurd.ini";
Restart = "always"; Restart = "always";
RuntimeDirectory = "murmur"; RuntimeDirectory = "murmur";
RuntimeDirectoryMode = "0700"; RuntimeDirectoryMode = "0700";