feat: add nixosModule template

This commit is contained in:
Mohammad Rafiq 2025-04-22 10:01:20 +08:00
parent c15c551b90
commit 91ea0edf43
No known key found for this signature in database
2 changed files with 25 additions and 0 deletions

23
nixosModules/default.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
lib,
pkgs,
...
}:
let
moduleName = "nixosModules";
cfg = config."${moduleName}";
in
{
imports = [
# The rest
];
options = {
"${moduleName}".enable = lib.mkEnableOption "Enable ${moduleName}.";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ micro ];
};
}