diff options
author | tv <tv@krebsco.de> | 2020-08-16 11:28:27 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2020-08-16 11:34:29 +0200 |
commit | b0880d573677e0f32562a40d127910ec6a1d3ae2 (patch) | |
tree | 607a3fc8d2db98ac09952f0cc70e44a427a795e7 /krebs/3modules/hosts.nix | |
parent | b63d24d58e1734b986d8e1fa5930e4ba51ddc4bc (diff) |
krebs.dns: allow disabling search-domain
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)) |