nix-community / nix-vscode-extensions

Nix expressions for VSCode and OpenVSX extensions [maintainers: @deemp, @AmeerTaweel]
MIT License
169 stars 9 forks source link

Some extensions b*tch about not being able to write into the extensions directory #46

Open yangm97 opened 10 months ago

yangm97 commented 10 months ago

Noticed this at the console:

Error while activating TypeScript/JavaScript: {"errno":-2,"code":"ENOENT","syscall":"stat","path":"/nix/store/lc0l4y05jrfpqr5j5h70pjchpx801h6y-vscode-extension-visualstudioexptteam-vscodeintellicode-1.2.30/share/vscode/extensions/visualstudioexptteam.vscodeintellicode/cache"}.

I suppose this extension in particular isn't following the best practices and stuff, but I wonder what would be a fix that doesn't depend on upstream.

mobsenpai commented 9 months ago

Yeah. The same is happening with this extension: https://open-vsx.org/extension/golf1052/base16-generator, I have used it to auto select various themes using base16 colors, but It is throwing errors, only If I install it this way. Otherwise if I install from extensions tab inside vscode, it works.

billy4479 commented 6 months ago

Same for the catppuccin theme. Changing accent color causes Error: EROFS: read-only file system, open '/home/<user>/.vscode-oss/extensions/catppuccin.catppuccin-vsc/themes/mocha.json'. I'm installing it in the "normal" way from vscode as a workaround for now. NVM just had to RTFM

AmeerTaweel commented 4 months ago

I recently came across this Reddit post. The post and comments mention Nix-Bwrapper and NixPak for sandboxing packages. Maybe we can wrap extensions that want to write to the extensions directory, and bind another writable directory in their write location.