nixos/keepalived: add package option (#346462)
KeepAlived: Support pkg override without overlaying Co-authored-by: Antoine 'Toinux' Lesieur <toinux@nixos.local> Co-authored-by: Arne Keller <arne.keller@posteo.de>
This commit is contained in:
co-authored by
Antoine 'Toinux' Lesieur
Arne Keller
parent
b4801729f1
commit
a2c878df50
@@ -153,6 +153,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkPackageOption pkgs "keepalived" { };
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
@@ -334,7 +336,7 @@ in
|
||||
umask 077
|
||||
${pkgs.envsubst}/bin/envsubst -i "${keepalivedConf}" > ${finalConfigFile}
|
||||
'');
|
||||
ExecStart = "${pkgs.keepalived}/sbin/keepalived"
|
||||
ExecStart = "${lib.getExe cfg.package}"
|
||||
+ " -f ${finalConfigFile}"
|
||||
+ " -p ${pidFile}"
|
||||
+ optionalString cfg.snmp.enable " --snmp";
|
||||
|
||||
Reference in New Issue
Block a user