hm modules: gate behind enable options, always import

This commit is contained in:
müde 2026-05-03 15:19:06 +02:00
parent 6ee82131cd
commit c8cfa37bb9
8 changed files with 67 additions and 36 deletions

View file

@ -1,12 +1,17 @@
{ lib, config, ... }:
{
home.file = {
"Templates/Empty file".text = "";
"Templates/Empty bash script".text = ''
#!/usr/bin/env bash
# abort on error, undefined variables
set -eu
# print commands before execution
set -x
'';
options.my.templates.enable = lib.mkEnableOption "file templates";
config = lib.mkIf config.my.templates.enable {
home.file = {
"Templates/Empty file".text = "";
"Templates/Empty bash script".text = ''
#!/usr/bin/env bash
# abort on error, undefined variables
set -eu
# print commands before execution
set -x
'';
};
};
}