feat(lib): Add mkEnableModule function
This commit is contained in:
parent
6f255b10a3
commit
654088a3f9
1 changed files with 11 additions and 1 deletions
|
@ -1,6 +1,16 @@
|
||||||
{ lib, ... }:
|
{ lib, namespace, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
rec {
|
rec {
|
||||||
|
## Create a module option with only an enable option.
|
||||||
|
## ```nix
|
||||||
|
## options = lib.mkEnableModule "module-name"
|
||||||
|
## ```
|
||||||
|
##
|
||||||
|
#@ String
|
||||||
|
mkEnableModule = name: {
|
||||||
|
${namespace}.${name}.enable = mkEnableModule "${name}";
|
||||||
|
};
|
||||||
|
|
||||||
## Create a NixOS module option.
|
## Create a NixOS module option.
|
||||||
##
|
##
|
||||||
## ```nix
|
## ```nix
|
||||||
|
|
Loading…
Reference in a new issue