diff options
Diffstat (limited to 'krebs/3modules/hosts.nix')
-rw-r--r-- | krebs/3modules/hosts.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix index 7fe01a769..159b54e34 100644 --- a/krebs/3modules/hosts.nix +++ b/krebs/3modules/hosts.nix @@ -24,7 +24,11 @@ in { aliases = longs ++ shorts; longs = filter check net.aliases; shorts = let s = ".${config.krebs.dns.search-domain}"; in - map (removeSuffix s) (filter (hasSuffix s) longs); + optionals + (config.krebs.dns.search-domain != null) + (map (removeSuffix s) + (filter (hasSuffix s) + longs)); in map (addr: { ${addr} = aliases; }) net.addrs) (attrValues host.nets)) |