(modules/flake) implement recursively loaded libraries

This commit is contained in:
Jo 2025-01-23 00:07:39 +01:00
parent e54b87a835
commit c322461fe1
4 changed files with 56 additions and 2 deletions

16
lib/module/default.nix Normal file
View file

@ -0,0 +1,16 @@
{
lib,
...
}:
{
## Create a NixOS module option as a one-liner.
##
## ```nix
## lib.mkOpt nixpkgs.lib.types.str "My default" "Option description"
## ```
##
#@ Type -> Any -> String
mkOpt =
type: default: description:
lib.mkOption { inherit type default description; };
}