Add HM module template
This commit is contained in:
16
home/modules/0_template/default.nix
Normal file
16
home/modules/0_template/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
nixosConfig,
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with mylib.modules; let
|
||||||
|
cfg = config.modules.TEMPLATE;
|
||||||
|
in {
|
||||||
|
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {};
|
||||||
|
}
|
9
home/modules/0_template/options.nix
Normal file
9
home/modules/0_template/options.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with mylib.modules; {
|
||||||
|
enable = mkEnableOpt "TEMPLATE";
|
||||||
|
}
|
Reference in New Issue
Block a user