mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-01-18 09:53:06 +01:00
feat(lib): add mkOpt function
This commit is contained in:
parent
acd42932a5
commit
63bc2f18ff
1 changed files with 16 additions and 0 deletions
16
lib/module/default.nix
Normal file
16
lib/module/default.nix
Normal 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; };
|
||||
}
|
Loading…
Reference in a new issue