From f34e5f1c6c67cc60e6f84c558534a4d5da8abd08 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 (cherry picked from commit 9b3122e92c855ac406f8bb1868a830a42855fd22) --- 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 703b22773..1914c0343 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 @@ -96,7 +97,6 @@ let ./xresources.nix ./xsession.nix - ] ++