(modules/flake) improve library loading and implement system class module mappings

This commit is contained in:
Jo 2025-01-29 12:17:34 +01:00
parent 7d16e19c8b
commit f139b88c0b
9 changed files with 144 additions and 73 deletions

View file

@ -3,14 +3,14 @@
...
}:
{
## Create a NixOS module option as a one-liner.
##
## ```nix
## lib.mkOpt nixpkgs.lib.types.str "My default" "Option description"
## ```
##
#@ Type -> Any -> String
# Create a NixOS module option on a single line.
mkOpt =
type: default: description:
lib.mkOption { inherit type default description; };
mkBool =
default: description:
lib.mkOption { inherit default description; type = lib.types.bool; };
# Todo: add mkIfElse function
}