nixos/lib/testing: fix network module
This fixes acme tests. Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ let
|
||||
nameValuePair
|
||||
optionalAttrs
|
||||
optionalString
|
||||
optionals
|
||||
range
|
||||
toLower
|
||||
types
|
||||
@@ -95,16 +96,18 @@ let
|
||||
name: config:
|
||||
let
|
||||
hostnames =
|
||||
optionalString (
|
||||
config.networking.domain != null
|
||||
) "${config.networking.hostName}.${config.networking.domain} "
|
||||
+ "${config.networking.hostName}\n";
|
||||
[
|
||||
"${config.networking.hostName}"
|
||||
]
|
||||
++ optionals (config.networking.domain != null) [
|
||||
"${config.networking.hostName}.${config.networking.domain}"
|
||||
];
|
||||
in
|
||||
optionalAttrs (config.networking.primaryIPAddress != "") {
|
||||
"${config.networking.primaryIPAddress}" = [ hostnames ];
|
||||
"${config.networking.primaryIPAddress}" = hostnames;
|
||||
}
|
||||
// optionalAttrs (config.networking.primaryIPv6Address != "") {
|
||||
"${config.networking.primaryIPv6Address}" = [ hostnames ];
|
||||
"${config.networking.primaryIPv6Address}" = hostnames;
|
||||
}
|
||||
) nodes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user