Introduce mapNullable into lib and use it in a few places

Also simply some configure flag logic my grep also alerted me too.
This commit is contained in:
John Ericson
2017-04-17 17:04:04 -04:00
parent f3055a3c50
commit 85aa5005af
7 changed files with 18 additions and 14 deletions
@@ -4,7 +4,7 @@ with lib;
let
cfg = config.services.graphite;
writeTextOrNull = f: t: if t == null then null else pkgs.writeTextDir f t;
writeTextOrNull = f: t: mapNullable (pkgs.writeTextDir f) t;
dataDir = cfg.dataDir;