feat(lib): add mkOpt function

This commit is contained in:
Jo 2024-12-25 23:32:40 +01:00
parent acd42932a5
commit 63bc2f18ff

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

@ -0,0 +1,16 @@
{
lib,
...
}: with lib;
rec {
## Create a NixOS module option. (Stolen from Jake Hamilton)
##
## ```nix
## lib.mkOpt nixpkgs.lib.types.str "My default" "Description of my option."
## ```
##
#@ Type -> Any -> String
mkOpt =
type: default: description:
mkOption { inherit type default description; };
}