summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
committermakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
commite8b6cc0587929a7ebd0d00f83d298640b20b055f (patch)
treee0f813b8264119a84d6b8c32fa68041c8541ab59 /lib
parentfd41a76d4cab2765f9ef95ce5322b7bffe52b8a7 (diff)
parent242530680d5dcb37a5a023d0b8f6155ab441cead (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix6
-rw-r--r--lib/types.nix4
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index f02959bba..be9f60f3b 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -60,13 +60,17 @@ let
}.${typeOf x};
mapNixDir1 = f: dirPath:
+ let
+ toPackageName = name:
+ if test "^[0-9].*" name then "_${name}" else name;
+ in
listToAttrs
(map
(relPath: let
name = removeSuffix ".nix" relPath;
path = dirPath + "/${relPath}";
in
- nameValuePair name (f path))
+ nameValuePair (toPackageName name) (f path))
(filter
(name: name != "default.nix" && !hasPrefix "." name)
(attrNames (readDir dirPath))));
diff --git a/lib/types.nix b/lib/types.nix
index 3eda2262f..689a2c807 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -116,6 +116,10 @@ rec {
type = listOf hostname;
default = [];
};
+ mac = mkOption {
+ type = nullOr str;
+ default = null;
+ };
ip4 = mkOption {
type = nullOr (submodule {
options = {