summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-06-02 23:35:17 +0200
committertv <tv@krebsco.de>2020-06-02 23:35:17 +0200
commit96b616f8cb14869a967f8d435a07d57f1a42aff2 (patch)
treeeb8a5a4d2b1e3a7c17111020dbc1aaf9e9eacaac /lib
parent5588920842f989efede0890bbd23f863692986d1 (diff)
parentbbbf850e2b8f98a0d4067cded1ea21b0b596a37d (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix2
-rw-r--r--lib/types.nix6
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 14e6e27..5a948bb 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -49,6 +49,8 @@ let
indent = replaceChars ["\n"] ["\n "];
+ stripAttr = converge (filterAttrsRecursive (n: v: v != {} && v != null));
+
mapNixDir = f: x: {
list = foldl' mergeAttrs {} (map (mapNixDir1 f) x);
path = mapNixDir1 f x;
diff --git a/lib/types.nix b/lib/types.nix
index ffae8c7..16ccb14 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -7,7 +7,7 @@ let
mkOptionType optional optionalAttrs optionals range splitString
stringLength substring test testString typeOf;
inherit (lib.types)
- attrsOf bool either enum int listOf nullOr path str string submodule;
+ attrsOf bool either enum int listOf nullOr path str submodule;
in
rec {
@@ -65,7 +65,7 @@ rec {
extraZones = mkOption {
default = {};
# TODO: string is either MX, NS, A or AAAA
- type = attrsOf string;
+ type = attrsOf str;
};
secure = mkOption {
@@ -182,7 +182,7 @@ rec {
extraConfig = mkOption {
description = "Extra Configuration to be appended to the hosts file";
default = "";
- type = string;
+ type = str;
};
port = mkOption {
type = int;