mochi/.vscode/module.code-snippets
2024-06-20 08:59:56 -05:00

32 lines
659 B
Text

{
"nix-module": {
"prefix": "nm",
"body": [
"{ lib",
", config",
", pkgs",
", ...",
"}:",
"with lib;",
"let",
" cfg = config.mySystem.${1}.${2};",
" app = \"${3}\"",
" appFolder = \"apps/${app}\";",
" persistentFolder = \"${config.mySystem.persistentFolder}/${appFolder}\";",
" user = app;",
" group = app;",
"in",
"{",
" options.mySystem.${1}.${2}.enable = mkEnableOption \"${4}\";",
"",
" config = mkIf cfg.enable {",
"",
" $5",
"",
" };",
"}",
""
],
"description": "nix-module"
}
}