diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2024-01-22 22:43:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 22:43:29 +0100 |
commit | 5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80 (patch) | |
tree | 15b0045719cc302c749a48dcb1b3e09915c25274 /nixos/modules/services | |
parent | f35e0b7d21250cdfeb2d23a89cb8bcd567216d61 (diff) | |
parent | 08c95629950342c4d2185b82a59aec2226f38b96 (diff) | |
download | nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar.gz nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar.bz2 nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar.lz nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar.xz nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.tar.zst nixlib-5b14fea3d67d544c27b9bc8fcc18a8eecb4dcf80.zip |
Merge pull request #280405 from RaitoBezarius/keepalived-unicast
nixos/networking/keepalived: do not emit `unicastPeers` when there are none
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/networking/keepalived/default.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/keepalived/default.nix b/nixos/modules/services/networking/keepalived/default.nix index 429a47c3962c..599dfd52e271 100644 --- a/nixos/modules/services/networking/keepalived/default.nix +++ b/nixos/modules/services/networking/keepalived/default.nix @@ -59,9 +59,11 @@ let ${optionalString i.vmacXmitBase "vmac_xmit_base"} ${optionalString (i.unicastSrcIp != null) "unicast_src_ip ${i.unicastSrcIp}"} - unicast_peer { - ${concatStringsSep "\n" i.unicastPeers} - } + ${optionalString (builtins.length i.unicastPeers > 0) '' + unicast_peer { + ${concatStringsSep "\n" i.unicastPeers} + } + ''} virtual_ipaddress { ${concatMapStringsSep "\n" virtualIpLine i.virtualIps} @@ -138,6 +140,7 @@ let in { + meta.maintainers = [ lib.maintainers.raitobezarius ]; options = { services.keepalived = { |