zed: use mkEnableOption in snippets
This commit is contained in:
parent
57b4940553
commit
39e5d49a36
1 changed files with 7 additions and 7 deletions
|
@ -9,11 +9,11 @@
|
||||||
" ...",
|
" ...",
|
||||||
"}:",
|
"}:",
|
||||||
"with lib; let",
|
"with lib; let",
|
||||||
" cfg = config.custom.$1;",
|
" cfg = config.custom.$1.$2;",
|
||||||
" hm = config.home-manager.users.\\${config.custom.username};",
|
" hm = config.home-manager.users.\\${config.custom.username};",
|
||||||
"in {",
|
"in {",
|
||||||
" options.custom.$1 = {",
|
" options.custom.$1.$2 = {",
|
||||||
" enable = mkOption {default = false;};",
|
" enable = mkEnableOption \"$2\";",
|
||||||
" };",
|
" };",
|
||||||
"",
|
"",
|
||||||
" config = mkIf cfg.enable {",
|
" config = mkIf cfg.enable {",
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
" cfg = config.custom.containers.$1;",
|
" cfg = config.custom.containers.$1;",
|
||||||
"in {",
|
"in {",
|
||||||
" options.custom.containers.$1 = {",
|
" options.custom.containers.$1 = {",
|
||||||
" enable = mkOption {default = false;};",
|
" enable = mkEnableOption \"$1\";",
|
||||||
" };",
|
" };",
|
||||||
"",
|
"",
|
||||||
" config = mkIf cfg.enable {",
|
" config = mkIf cfg.enable {",
|
||||||
|
@ -125,10 +125,10 @@
|
||||||
" ...",
|
" ...",
|
||||||
"}:",
|
"}:",
|
||||||
"with lib; let",
|
"with lib; let",
|
||||||
" cfg = config.custom.$1;",
|
" cfg = config.custom.$1.$2;",
|
||||||
"in {",
|
"in {",
|
||||||
" options.custom.$1 = {",
|
" options.custom.$1.$2 = {",
|
||||||
" enable = mkOption {default = false;};",
|
" enable = mkEnableOption \"$2\";",
|
||||||
" };",
|
" };",
|
||||||
"",
|
"",
|
||||||
" config = mkIf cfg.enable {",
|
" config = mkIf cfg.enable {",
|
||||||
|
|
Loading…
Add table
Reference in a new issue