summaryrefslogtreecommitdiff
path: root/modules/misc
diff options
context:
space:
mode:
authorChris Montgomery <chris@alley.co>2022-01-23 12:42:09 -0500
committerChris Montgomery <chris@alley.co>2022-01-23 12:42:09 -0500
commit9c645f5c61ce9401ea0402feccc15a70443df5ad (patch)
tree49929bd153629d585994e82cf960fa5f58cbdaa5 /modules/misc
parentbcdb6022b3a300abf59cb5d0106c158940f5120e (diff)
feat: add top-level `lib` option
For parity with NixOS: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/lib.nix
Diffstat (limited to 'modules/misc')
-rw-r--r--modules/misc/lib.nix15
1 files changed, 15 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.
+ '';
+ };
+ };
+}