summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/hosts.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-08-19 21:16:46 +0200
committerlassulus <lassulus@lassul.us>2020-08-19 21:16:46 +0200
commit0b4329eb0a24e5f6e5935f6242c7087015fdf104 (patch)
tree20b4b0302b601827c49adff0add17e66e3609cf0 /krebs/3modules/hosts.nix
parent6538131f91ce9dbedc8efaa6c1d6196ad5b0f3d6 (diff)
parent358633f9737c8327d6028ebfadf72cbb51df70fb (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules/hosts.nix')
-rw-r--r--krebs/3modules/hosts.nix6
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))