hm modules: gate behind enable options, always import
This commit is contained in:
parent
6ee82131cd
commit
c8cfa37bb9
8 changed files with 67 additions and 36 deletions
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue