summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2022-04-25 22:59:34 +0200
committerGitHub <noreply@github.com>2022-04-25 22:59:34 +0200
commitaba9ce944e27428a5de500a19c6e9916e0ec2a8b (patch)
treef48d5c9a0b72a0c5d13b698218598d7d52e08824 /modules
parentd010355f1b5e2211c33ed9faf1b1d725af63955d (diff)
parent3bb62d40a2ef5c7c1b5634c58c47dd4a239d7618 (diff)
Merge pull request #429 from montchr/add-toplevel-option-lib
Add top-level `lib` option based on NixOS
Diffstat (limited to 'modules')
-rw-r--r--modules/misc/lib.nix15
-rw-r--r--modules/module-list.nix1
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/misc/lib.nix b/modules/misc/lib.nix
new file mode 100644
index 0000000..e50794c
--- /dev/null
+++ b/modules/misc/lib.nix
@@ -0,0 +1,15 @@
+{ lib, ... }:
+
+{
+ options = {
+ lib = lib.mkOption {
+ default = { };
+
+ type = lib.types.attrsOf lib.types.attrs;
+
+ description = ''
+ This option allows modules to define helper functions, constants, etc.
+ '';
+ };
+ };
+}
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 22e11e7..71ea9a2 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -1,6 +1,7 @@
[
./alias.nix
./documentation
+ ./misc/lib.nix
./security/pki
./security/sandbox
./system