Merge pull request #280405 from RaitoBezarius/keepalived-unicast

nixos/networking/keepalived: do not emit `unicastPeers` when there are none
This commit is contained in:
Ryan Lahfa 2024-01-22 22:43:29 +01:00 committed by GitHub
commit 5b14fea3d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View File

@ -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 = {

View File

@ -1,5 +1,6 @@
import ./make-test-python.nix ({ pkgs, ... }: {
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "keepalived";
maintainers = [ lib.maintainers.raitobezarius ];
nodes = {
node1 = { pkgs, ... }: {

View File

@ -39,5 +39,6 @@ stdenv.mkDerivation rec {
description = "Routing software written in C";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.raitobezarius ];
};
}