Skip to content

Commit

Permalink
nixos/keepalived: add package option (#346462)
Browse files Browse the repository at this point in the history
KeepAlived: Support pkg override without overlaying

Co-authored-by: Antoine 'Toinux' Lesieur <[email protected]>
Co-authored-by: Arne Keller <[email protected]>
  • Loading branch information
3 people authored Dec 31, 2024
1 parent b480172 commit a2c878d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos/modules/services/networking/keepalived/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ in
'';
};

package = lib.mkPackageOption pkgs "keepalived" { };

openFirewall = mkOption {
type = types.bool;
default = false;
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit a2c878d

Please sign in to comment.