My nix-darwin and NixOS config
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(vscode): add language support for shell, Docker, TOML, YAML, and Makefile

Extensions (settings/config/development.nix)
- bash-ide-vscode, shellcheck, shell-format — Bash LSP + linting + formatting
- ms-azuretools.vscode-docker — Dockerfile syntax and Docker integration
- tamasfe.even-better-toml — TOML (Cargo.toml, starship.toml, pyproject.toml)
- redhat.vscode-yaml — YAML with schema validation
- ms-vscode.makefile-tools — Makefile support (marketplace)
- Clarify ms-dotnettools.csharp covers VB.NET too

Packages (settings/config/packages.nix)
- Add shellcheck and shfmt so shell extensions can resolve their binaries

Settings (home/programs/vscode.nix)
- Add explicit editor.defaultFormatter bindings for every used language:
JS/TS → prettier, Svelte → svelte-vscode, TOML → even-better-toml,
shell → shell-format, Dockerfile → vscode-docker, Makefile → makefile-tools
- Add shell extension binary paths (shellcheck.executablePath, shellformat.path,
bashIde.shellcheckPath) pointing at Nix-managed installs
- Enable YAML validation and formatting
- Add TOML formatter options
- Move [python].defaultFormatter into the unified formatters block

+117 -54
+82 -40
home/programs/vscode.nix
··· 1 - { config, pkgs, lib, cfgLib, ... }: 1 + { 2 + pkgs, 3 + lib, 4 + cfgLib, 5 + ... 6 + }: 2 7 3 8 let 4 9 cfg = cfgLib.cfg; 5 10 6 - # Resolve "publisher.name" → pkgs.vscode-extensions.<publisher>.<name> 7 - toNixpkgsExt = extStr: 8 - let parts = lib.splitString "." extStr; 9 - in pkgs.vscode-extensions.${builtins.elemAt parts 0}.${builtins.elemAt parts 1}; 11 + # Resolve "publisher.name" → pkgs.vscode-extensions.<publisher>.<n> 12 + toNixpkgsExt = 13 + extStr: 14 + let 15 + parts = lib.splitString "." extStr; 16 + in 17 + pkgs.vscode-extensions.${builtins.elemAt parts 0}.${builtins.elemAt parts 1}; 10 18 11 - # Resolve "publisher.name" → pkgs.vscode-marketplace.<publisher>.<name> 19 + # Resolve "publisher.name" → pkgs.vscode-marketplace.<publisher>.<n> 12 20 # Provided by the nix-vscode-extensions overlay added in flake.nix. 13 - toMarketplaceExt = extStr: 14 - let parts = lib.splitString "." extStr; 15 - in pkgs.vscode-marketplace.${builtins.elemAt parts 0}.${builtins.elemAt parts 1}; 21 + toMarketplaceExt = 22 + extStr: 23 + let 24 + parts = lib.splitString "." extStr; 25 + in 26 + pkgs.vscode-marketplace.${builtins.elemAt parts 0}.${builtins.elemAt parts 1}; 16 27 in 17 28 { 18 29 programs.vscode = { ··· 20 31 21 32 profiles.default = { 22 33 extensions = 23 - map toNixpkgsExt cfg.development.vscode.extensions 34 + map toNixpkgsExt cfg.development.vscode.extensions 24 35 ++ map toMarketplaceExt cfg.development.vscode.marketplaceExtensions; 25 36 26 37 userSettings = { 27 - "workbench.colorTheme" = lib.mkDefault cfg.development.vscode.colorTheme; 28 - "workbench.iconTheme" = lib.mkDefault cfg.development.vscode.iconTheme; 29 - "editor.fontFamily" = cfg.development.vscode.fontFamily; 30 - "editor.fontSize" = cfg.development.vscode.fontSize; 31 - "editor.lineHeight" = cfg.development.vscode.lineHeight; 32 - "editor.fontLigatures" = cfg.development.vscode.fontLigatures; 33 - "editor.formatOnSave" = true; 34 - "editor.minimap.enabled" = false; 35 - "editor.renderWhitespace" = "boundary"; 36 - "editor.rulers" = [ 80 120 ]; 37 - "editor.tabSize" = 2; 38 - "editor.insertSpaces" = true; 39 - "files.autoSave" = "afterDelay"; 40 - "files.autoSaveDelay" = 1000; 41 - "git.autofetch" = true; 42 - "git.confirmSync" = false; 43 - "terminal.integrated.fontFamily" = cfg.development.vscode.terminalFontFamily; 44 - "terminal.integrated.fontSize" = cfg.development.vscode.terminalFontSize; 45 - "workbench.startupEditor" = "none"; 46 - "explorer.confirmDelete" = false; 47 - "explorer.confirmDragAndDrop" = false; 38 + "workbench.colorTheme" = lib.mkDefault cfg.development.vscode.colorTheme; 39 + "workbench.iconTheme" = lib.mkDefault cfg.development.vscode.iconTheme; 40 + "editor.fontFamily" = cfg.development.vscode.fontFamily; 41 + "editor.fontSize" = cfg.development.vscode.fontSize; 42 + "editor.lineHeight" = cfg.development.vscode.lineHeight; 43 + "editor.fontLigatures" = cfg.development.vscode.fontLigatures; 44 + "editor.formatOnSave" = true; 45 + "editor.minimap.enabled" = false; 46 + "editor.renderWhitespace" = "boundary"; 47 + "editor.rulers" = [ 48 + 80 49 + 120 50 + ]; 51 + "editor.tabSize" = 2; 52 + "editor.insertSpaces" = true; 53 + "files.autoSave" = "afterDelay"; 54 + "files.autoSaveDelay" = 1000; 55 + "git.autofetch" = true; 56 + "git.confirmSync" = false; 57 + "terminal.integrated.fontFamily" = cfg.development.vscode.terminalFontFamily; 58 + "terminal.integrated.fontSize" = cfg.development.vscode.terminalFontSize; 59 + "workbench.startupEditor" = "none"; 60 + "explorer.confirmDelete" = false; 61 + "explorer.confirmDragAndDrop" = false; 48 62 49 - # Nix IDE — point at the nil language server 50 - "nix.enableLanguageServer" = true; 51 - "nix.serverPath" = "nil"; 63 + # ── Per-language default formatters ─────────────────────────────────── 64 + "[javascript]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 65 + "[typescript]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 66 + "[svelte]"."editor.defaultFormatter" = "svelte.svelte-vscode"; 67 + "[css]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 68 + "[html]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 69 + "[json]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 70 + "[jsonc]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 71 + "[yaml]"."editor.defaultFormatter" = "esbenp.prettier-vscode"; 72 + "[toml]"."editor.defaultFormatter" = "tamasfe.even-better-toml"; 73 + "[shellscript]"."editor.defaultFormatter" = "foxundermoon.shell-format"; 74 + "[dockerfile]"."editor.defaultFormatter" = "ms-azuretools.vscode-docker"; 75 + "[makefile]"."editor.defaultFormatter" = "ms-vscode.makefile-tools"; 76 + "[python]"."editor.defaultFormatter" = "charliermarsh.ruff"; 77 + 78 + # ── Nix IDE ─────────────────────────────────────────────────────────── 79 + "nix.enableLanguageServer" = true; 80 + "nix.serverPath" = "nil"; 52 81 "nix.serverSettings".nil.formatting.command = [ "nixfmt" ]; 53 82 54 - # Go — use the gopls on PATH 55 - "go.useLanguageServer" = true; 83 + # ── Go ──────────────────────────────────────────────────────────────── 84 + "go.useLanguageServer" = true; 56 85 57 - # Python — use pyright for type checking, ruff for linting/formatting 58 - "python.analysis.typeCheckingMode" = "basic"; 59 - "[python]"."editor.defaultFormatter" = "charliermarsh.ruff"; 60 - "ruff.lint.enable" = true; 86 + # ── Python ─────────────────────────────────────────────────────────── 87 + "python.analysis.typeCheckingMode" = "basic"; 88 + "ruff.lint.enable" = true; 89 + 90 + # ── Shell ───────────────────────────────────────────────────────────── 91 + # Point extensions at Nix-managed binaries so they work regardless of PATH. 92 + "shellcheck.executablePath" = "shellcheck"; 93 + "shellformat.path" = "shfmt"; 94 + "bashIde.shellcheckPath" = "shellcheck"; 95 + 96 + # ── YAML ────────────────────────────────────────────────────────────── 97 + "yaml.format.enable" = true; 98 + "yaml.validate" = true; 99 + 100 + # ── TOML ────────────────────────────────────────────────────────────── 101 + "evenBetterToml.formatter.alignEntries" = false; 102 + "evenBetterToml.formatter.arrayTrailingComma" = true; 61 103 }; 62 104 }; 63 105 };
+28 -11
settings/config/development.nix
··· 17 17 lineHeight = 22; 18 18 fontLigatures = true; 19 19 20 - # Extensions from nixpkgs (pkgs.vscode-extensions.<publisher>.<name>). 20 + # Extensions from nixpkgs (pkgs.vscode-extensions.<publisher>.<n>). 21 21 # Must match attribute paths in the nixpkgs vscode-extensions set. 22 22 extensions = [ 23 - # ── Nix ───────────────────────────────────────────────────────────── 23 + # ── Nix ────────────────────────────────────────────────────────────────── 24 24 "jnoortheen.nix-ide" # Nix LSP, formatting, error reporting 25 25 26 - # ── Languages ─────────────────────────────────────────────────────── 26 + # ── Python ─────────────────────────────────────────────────────────────── 27 27 "ms-python.python" # Python IntelliSense + debugger 28 28 "ms-python.debugpy" # Python debugger (required peer dep) 29 + 30 + # ── Rust ───────────────────────────────────────────────────────────────── 29 31 "rust-lang.rust-analyzer" # Rust LSP 30 - "ms-dotnettools.csharp" # C# language support 32 + 33 + # ── C# / VB.NET (.NET) ─────────────────────────────────────────────────── 34 + "ms-dotnettools.csharp" # C# and VB.NET language support 31 35 "ms-dotnettools.csdevkit" # C# Dev Kit (solution explorer, test runner) 32 36 33 - # ── Web / Frontend ────────────────────────────────────────────────── 37 + # ── Shell / Bash ───────────────────────────────────────────────────────── 38 + "mads-hartmann.bash-ide-vscode" # Bash language server 39 + "timonwong.shellcheck" # ShellCheck linting for sh/bash/zsh 40 + "foxundermoon.shell-format" # shfmt formatter for shell scripts 41 + 42 + # ── Docker ─────────────────────────────────────────────────────────────── 43 + "ms-azuretools.vscode-docker" # Dockerfile syntax, linting, Docker integration 44 + 45 + # ── Data / config formats ───────────────────────────────────────────────── 46 + "tamasfe.even-better-toml" # TOML (Cargo.toml, starship.toml, pyproject.toml…) 47 + "redhat.vscode-yaml" # YAML with JSON schema validation 48 + 49 + # ── Web / Frontend ──────────────────────────────────────────────────────── 34 50 "bradlc.vscode-tailwindcss" # Tailwind CSS IntelliSense 35 - "dbaeumer.vscode-eslint" # ESLint integration 36 - "esbenp.prettier-vscode" # Prettier formatter 51 + "dbaeumer.vscode-eslint" # ESLint (JS/TS/Svelte) 52 + "esbenp.prettier-vscode" # Prettier formatter (JS/TS/CSS/HTML/JSON/YAML…) 37 53 38 - # ── Git ───────────────────────────────────────────────────────────── 54 + # ── Git ─────────────────────────────────────────────────────────────────── 39 55 "eamodio.gitlens" # Git blame, history, diffing 40 56 "editorconfig.editorconfig" # .editorconfig support 41 57 42 - # ── General quality-of-life ───────────────────────────────────────── 58 + # ── General quality-of-life ─────────────────────────────────────────────── 43 59 "streetsidesoftware.code-spell-checker" # Spell checking in comments/strings 44 60 "christian-kohler.path-intellisense" # Filename autocompletion 45 61 46 - # ── Theme / icons ─────────────────────────────────────────────────── 62 + # ── Theme / icons ───────────────────────────────────────────────────────── 47 63 # catppuccin-vsc and catppuccin-vsc-icons are installed by the 48 64 # catppuccin home-manager module automatically — do not declare here. 49 65 ]; 50 66 51 67 # Extensions from the VS Code Marketplace via the nix-vscode-extensions 52 - # overlay (pkgs.vscode-marketplace.<publisher>.<name>). 68 + # overlay (pkgs.vscode-marketplace.<publisher>.<n>). 53 69 # Use this for extensions not packaged in base nixpkgs 25.11. 54 70 marketplaceExtensions = [ 55 71 "golang.go" # Go language support (requires gopls on PATH) 56 72 "svelte.svelte-vscode" # Svelte language server 73 + "ms-vscode.makefile-tools" # Makefile syntax, build targets, IntelliSense 57 74 ]; 58 75 }; 59 76 }
+7 -3
settings/config/packages.nix
··· 60 60 "dotnet-sdk" # .NET SDK 61 61 62 62 # Go tooling 63 - "gopls" # Go language server (golang.go extension) 63 + "gopls" # Go language server (golang.go extension) 64 64 "golangci-lint" # Go linter 65 - "delve" # Go debugger 65 + "delve" # Go debugger 66 66 67 67 # Python tooling 68 68 "pipx" 69 69 "uv" 70 - "ruff" # Fast Python linter + formatter 70 + "ruff" # Fast Python linter + formatter 71 71 "pyright" # Python type checker / language server 72 + 73 + # Shell tooling 74 + "shellcheck" # Shell script static analysis (timonwong.shellcheck extension) 75 + "shfmt" # Shell script formatter (foxundermoon.shell-format extension) 72 76 73 77 # Build tools 74 78 "cmake"