Visual Studio Code: Difference between revisions
imported>Nix m Nix moved page Vscode to Visual Studio Code: match official name |
imported>Nix add Home Manager install |
||
Line 4: | Line 4: | ||
== Installing Microsoft's Visual Studio Code == | == Installing Microsoft's Visual Studio Code == | ||
=== With Home Manager === | |||
If you are using [[Home Manager]], you will want to modify your <code>home.nix</code> (or a file inherited by it). Example: | |||
{{file|~/home.nix|nix|<nowiki> | |||
{ config, pkgs, ... }: | |||
{ | |||
programs.home-manager.enable = true; | |||
... # More of your home-manager config | |||
programs = { | |||
... # Start of your programs config | |||
vscode = { | |||
enable = true; | |||
package = pkgs.vscodium; # You can skip this if you want to use the unfree version | |||
extensions = with pkgs.vscode-extensions; [ | |||
# Some example extensions... | |||
dracula-theme.theme-dracula | |||
vscodevim.vim | |||
yzhang.markdown-all-in-one | |||
]; | |||
} | |||
... # Rest of your programs config | |||
} | |||
... # Rest of your home-manager config | |||
} | |||
</nowiki>}} | |||
* See for more options: [https://nix-community.github.io/home-manager/options.html#opt-programs.vscode.enable Home Manager Manual: Options - programs.vscode] | |||
* Search for extensions with configurations: [https://search.nixos.org/packages?channel=unstable&from=0&size=30&sort=relevance&type=packages&query=vscode-extensions NixOS Search: vscode-extensions] | |||
=== With nix-env === | |||
Because it is NixOS, you don't have to be root in order to be able to install stuff. As a normal user, do: | Because it is NixOS, you don't have to be root in order to be able to install stuff. As a normal user, do: |