Skip to content

Commit 4a842ae

Browse files
committed
nixos/lib/testing: fix network module
This fixes acme tests. Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
1 parent c5bc76d commit 4a842ae

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

nixos/lib/testing/network.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let
1313
nameValuePair
1414
optionalAttrs
1515
optionalString
16+
optionals
1617
range
1718
toLower
1819
types
@@ -95,16 +96,18 @@ let
9596
name: config:
9697
let
9798
hostnames =
98-
optionalString (
99-
config.networking.domain != null
100-
) "${config.networking.hostName}.${config.networking.domain} "
101-
+ "${config.networking.hostName}\n";
99+
[
100+
"${config.networking.hostName}"
101+
]
102+
++ optionals (config.networking.domain != null) [
103+
"${config.networking.hostName}.${config.networking.domain}"
104+
];
102105
in
103106
optionalAttrs (config.networking.primaryIPAddress != "") {
104-
"${config.networking.primaryIPAddress}" = [ hostnames ];
107+
"${config.networking.primaryIPAddress}" = hostnames;
105108
}
106109
// optionalAttrs (config.networking.primaryIPv6Address != "") {
107-
"${config.networking.primaryIPv6Address}" = [ hostnames ];
110+
"${config.networking.primaryIPv6Address}" = hostnames;
108111
}
109112
) nodes;
110113

0 commit comments

Comments
 (0)