-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Are you following the right branch?
- My Nixpkgs and Home Manager versions are in sync
Is there an existing issue for this?
- I have searched the existing issues
Related Issues
This appears to be a regression that worsened #7880. See also #7719 and #3507.
Issue description
After updating home-manager past commit b59376563943ce163b2553aeb63d0c170967d74e (Feb 1, 2026 - "vscode: fix extension path for antigravity"), extensions defined under profiles.default.extensions are no longer recognized by VS Code, even though they are correctly symlinked.
Before the update (home-manager d055b309... from Jan 23): Extensions worked
After the update (home-manager 436b2774... from Feb 21, includes the commit): Extensions not loaded
Steps to Reproduce
- Use
profiles.default.extensionsin vscode config - Run
darwin-rebuild switch(orhome-manager switch) - Open VS Code
- Run
code --list-extensions- shows only manually installed extensions
Actual Output
$ code --list-extensions
github.copilot-chat # Only 1 of 9 declared extensions
$ ls ~/.vscode/extensions/
.extensions-immutable.json -> /nix/store/... # Correctly symlinked
Ionide.Ionide-fsharp -> /nix/store/... # Correctly symlinked
ms-vscode.PowerShell -> /nix/store/... # Correctly symlinked
# ... all 9 extensions present as symlinks
$ cat ~/.vscode/extensions/.obsolete
{"ionide.ionide-fsharp-7.31.1":true,"ms-vscode.powershell-2025.4.0":true,...}
# VS Code marks them all obsoleteSymptoms
- Extensions are correctly symlinked in
~/.vscode/extensions/ .extensions-immutable.jsonis correctly generated with all extensions- VS Code's
extensions.jsononly recognizes manually installed extensions .obsoletefile marks all Nix-managed extensions as obsoletecode --list-extensionsshows only manually installed extensions
Configuration
programs.vscode = {
enable = true;
profiles.default.userSettings = { ... };
profiles.default.extensions = with pkgs; [
vscode-extensions.ionide.ionide-fsharp
vscode-extensions.ms-dotnettools.csdevkit
vscode-extensions.jnoortheen.nix-ide
vscode-extensions.ms-vscode.powershell
vscode-extensions.github.copilot-chat
# ... more extensions
];
};Root Cause Analysis
The commit b59376563943ce163b2553aeb63d0c170967d74e changed extension path handling:
- Removed the
sharePrefixvariable - Changed paths from
"${sharePrefix}/extensions"to hardcoded"/share/vscode/extensions" - Modified how
.extensions-immutable.jsonis generated
This change, intended to fix antigravity support, appears to have broken the extension loading mechanism for regular VS Code on Darwin when using profiles.default.extensions.
Workarounds
Workaround 1 (from #7880): Use legacy extensions option with mutableExtensionsDir = false:
programs.vscode = {
enable = true;
mutableExtensionsDir = false;
extensions = [ ... ]; # Instead of profiles.default.extensions
profiles.default.userSettings = { ... };
};Workaround 2 (from #7719): Delete VS Code state and rebuild (temporary fix, breaks again on next rebuild):
rm -rf ~/.vscode ~/Library/Application\ Support/Code
darwin-rebuild switch # or home-manager switchSystem information
- system: `"aarch64-darwin"`
- host os: `Darwin 25.3.0, macOS 26.3`
- multi-user?: `yes`
- sandbox: `no`
- nixpkgs: `d1c15b7d5806069da59e819999d70e1cec0760bf`
- home-manager: `436b27742c996b75e2baf8e835e3b3eae0c9fbd4`