From 9b3122e92c855ac406f8bb1868a830a42855fd22 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 27 Sep 2018 21:01:13 +0200 Subject: [PATCH] lib: copy module from NixOS Importing the module directly from NixOS causes the documentation to break, in particular the "Declared by" section. Fixes #405 --- modules/misc/lib.nix | 14 ++++++++++++++ modules/modules.nix | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/misc/lib.nix diff --git a/modules/misc/lib.nix b/modules/misc/lib.nix new file mode 100644 index 000000000..a09075453 --- /dev/null +++ b/modules/misc/lib.nix @@ -0,0 +1,14 @@ +{ lib, ... }: + +{ + options = { + lib = lib.mkOption { + type = lib.types.attrsOf lib.types.attrs; + default = {}; + description = '' + This option allows modules to define helper functions, + constants, etc. + ''; + }; + }; +} diff --git a/modules/modules.nix b/modules/modules.nix index 8da265ce1..1f056aa38 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -19,6 +19,7 @@ let ./manual.nix ./misc/fontconfig.nix ./misc/gtk.nix + ./misc/lib.nix ./misc/news.nix ./misc/nixpkgs.nix ./misc/pam.nix @@ -98,7 +99,6 @@ let ./xresources.nix ./xsession.nix - ] ++