summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-10-22 17:17:04 +0200
committermakefu <github@syntax-fehler.de>2015-10-22 17:17:04 +0200
commitf092e6acb4500569eccee7aed65b521adb3b07b6 (patch)
tree53b8d1cb5900d9909536917925b9fc2d50ff7242 /krebs
parentbe39c6d8494724c6d7c87b826830f626aada15d8 (diff)
krebs 3 zones: remove empty lines
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix
index 5c5bec005..075db1826 100644
--- a/krebs/3modules/default.nix
+++ b/krebs/3modules/default.nix
@@ -105,10 +105,14 @@ let
# Implements environment.etc."zones/<zone-name>"
environment.etc = let
+ stripEmptyLines = s: concatStringsSep "\n"
+ (remove "\n" (remove "" (splitString "\n" s)));
all-zones = foldAttrs (sum: current: sum + "\n" +current ) ""
- ([cfg.zone-head-config] ++ combined-hosts) ;
+ ([cfg.zone-head-config] ++ combined-hosts);
combined-hosts = (mapAttrsToList (name: value: value.extraZones) cfg.hosts );
- in lib.mapAttrs' (name: value: nameValuePair (("zones/" + name)) ({ text=value; })) all-zones;
+ in lib.mapAttrs' (name: value: nameValuePair
+ ("zones/" + name)
+ { text=(stripEmptyLines value); }) all-zones;
krebs.exim-smarthost.internet-aliases = let
format = from: to: