mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
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:
parent
c5bc76dc44
commit
4a842aed37
1 changed files with 9 additions and 6 deletions
|
@ -13,6 +13,7 @@ let
|
||||||
nameValuePair
|
nameValuePair
|
||||||
optionalAttrs
|
optionalAttrs
|
||||||
optionalString
|
optionalString
|
||||||
|
optionals
|
||||||
range
|
range
|
||||||
toLower
|
toLower
|
||||||
types
|
types
|
||||||
|
@ -95,16 +96,18 @@ let
|
||||||
name: config:
|
name: config:
|
||||||
let
|
let
|
||||||
hostnames =
|
hostnames =
|
||||||
optionalString (
|
[
|
||||||
config.networking.domain != null
|
"${config.networking.hostName}"
|
||||||
) "${config.networking.hostName}.${config.networking.domain} "
|
]
|
||||||
+ "${config.networking.hostName}\n";
|
++ optionals (config.networking.domain != null) [
|
||||||
|
"${config.networking.hostName}.${config.networking.domain}"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
optionalAttrs (config.networking.primaryIPAddress != "") {
|
optionalAttrs (config.networking.primaryIPAddress != "") {
|
||||||
"${config.networking.primaryIPAddress}" = [ hostnames ];
|
"${config.networking.primaryIPAddress}" = hostnames;
|
||||||
}
|
}
|
||||||
// optionalAttrs (config.networking.primaryIPv6Address != "") {
|
// optionalAttrs (config.networking.primaryIPv6Address != "") {
|
||||||
"${config.networking.primaryIPv6Address}" = [ hostnames ];
|
"${config.networking.primaryIPv6Address}" = hostnames;
|
||||||
}
|
}
|
||||||
) nodes;
|
) nodes;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue