1
1
Fork 0

zed: use mkEnableOption in snippets

This commit is contained in:
Myned 2025-04-01 21:26:22 -05:00
parent 57b4940553
commit 39e5d49a36
Signed by: myned
GPG key ID: C7224454F7881A34

View file

@ -9,11 +9,11 @@
" ...",
"}:",
"with lib; let",
" cfg = config.custom.$1;",
" cfg = config.custom.$1.$2;",
" hm = config.home-manager.users.\\${config.custom.username};",
"in {",
" options.custom.$1 = {",
" enable = mkOption {default = false;};",
" options.custom.$1.$2 = {",
" enable = mkEnableOption \"$2\";",
" };",
"",
" config = mkIf cfg.enable {",
@ -57,7 +57,7 @@
" cfg = config.custom.containers.$1;",
"in {",
" options.custom.containers.$1 = {",
" enable = mkOption {default = false;};",
" enable = mkEnableOption \"$1\";",
" };",
"",
" config = mkIf cfg.enable {",
@ -125,10 +125,10 @@
" ...",
"}:",
"with lib; let",
" cfg = config.custom.$1;",
" cfg = config.custom.$1.$2;",
"in {",
" options.custom.$1 = {",
" enable = mkOption {default = false;};",
" options.custom.$1.$2 = {",
" enable = mkEnableOption \"$2\";",
" };",
"",
" config = mkIf cfg.enable {",