mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
Revert "nixos/lib/testing: fix network module"
This reverts commit 35fb55d21b
.
This commit is contained in:
parent
145f715b75
commit
7c873c2d00
1 changed files with 6 additions and 9 deletions
|
@ -13,7 +13,6 @@ let
|
||||||
nameValuePair
|
nameValuePair
|
||||||
optionalAttrs
|
optionalAttrs
|
||||||
optionalString
|
optionalString
|
||||||
optionals
|
|
||||||
range
|
range
|
||||||
toLower
|
toLower
|
||||||
types
|
types
|
||||||
|
@ -96,18 +95,16 @@ let
|
||||||
name: config:
|
name: config:
|
||||||
let
|
let
|
||||||
hostnames =
|
hostnames =
|
||||||
[
|
optionalString (
|
||||||
"${config.networking.hostName}"
|
config.networking.domain != null
|
||||||
]
|
) "${config.networking.hostName}.${config.networking.domain} "
|
||||||
++ optionals (config.networking.domain != null) [
|
+ "${config.networking.hostName}\n";
|
||||||
"${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