diff --git a/lib/wireguard.nix b/lib/wireguard.nix index 0658de0..5f68522 100644 --- a/lib/wireguard.nix +++ b/lib/wireguard.nix @@ -140,11 +140,11 @@ in { (filter (x: net.cidr.contains x spannedReservedNetwork.cidrv4) (filter net.ip.isv4 explicitlyUsedAddresses)) participatingNodes; - # Assigns an ipv4 address from spannedReservedNetwork.cidrv4 - # to each participant that has not explicitly specified an ipv4 address. + # Assigns an ipv6 address from spannedReservedNetwork.cidrv6 + # to each participant that has not explicitly specified an ipv6 address. assignedIpv6Addresses = assert assertMsg (spannedReservedNetwork.cidrv6 != null) - "Wireguard network '${wgName}': At least one participating node must reserve a cidrv6 address via `reservedAddresses` so that ipv4 addresses can be assigned automatically from that network."; + "Wireguard network '${wgName}': At least one participating node must reserve a cidrv6 address via `reservedAddresses` so that ipv6 addresses can be assigned automatically from that network."; net.cidr.assignIps spannedReservedNetwork.cidrv6 # Don't assign any addresses that are explicitly configured on other hosts diff --git a/modules/wireguard.nix b/modules/wireguard.nix index 48fe101..49f8a2b 100644 --- a/modules/wireguard.nix +++ b/modules/wireguard.nix @@ -284,7 +284,7 @@ ]; }; - systemd.network.networks."${wgCfg.unitConfName}" = { + systemd.network.networks.${wgCfg.unitConfName} = { matchConfig.Name = wgCfg.linkName; address = map toNetworkAddr wgCfg.addresses; };