diff options
author | lassulus <lassulus@lassul.us> | 2020-08-19 21:16:46 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-08-19 21:16:46 +0200 |
commit | 0b4329eb0a24e5f6e5935f6242c7087015fdf104 (patch) | |
tree | 20b4b0302b601827c49adff0add17e66e3609cf0 /krebs/3modules/hosts.nix | |
parent | 6538131f91ce9dbedc8efaa6c1d6196ad5b0f3d6 (diff) | |
parent | 358633f9737c8327d6028ebfadf72cbb51df70fb (diff) |
Merge remote-tracking branch 'ni/master'
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)) |