mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
isolate vscode
This commit is contained in:
parent
2a4b3bbb79
commit
b0042ecd8f
2 changed files with 36 additions and 31 deletions
|
@ -9,6 +9,7 @@ with lib;
|
|||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./firefox.nix
|
||||
./vscode.nix
|
||||
];
|
||||
|
||||
config = mkIf (config.sconfig.desktop.enable) {
|
||||
|
@ -67,39 +68,8 @@ with lib;
|
|||
yt-dlp-light
|
||||
|
||||
(mpv.override { scripts = [ mpvScripts.mpris ]; })
|
||||
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-extensions; [
|
||||
esbenp.prettier-vscode
|
||||
jnoortheen.nix-ide
|
||||
ms-azuretools.vscode-docker
|
||||
# ms-python.python # currently broken (2023-10-26)
|
||||
redhat.vscode-yaml
|
||||
shardulm94.trailing-spaces
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
environment.etc."my-settings.sh".text = ''
|
||||
mkdir -p ~/.config/Code/User
|
||||
ln -sf /etc/vscode-settings.json ~/.config/Code/User/settings.json
|
||||
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
|
||||
'';
|
||||
|
||||
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
|
||||
environment.etc."vscode-settings.json".text = builtins.toJSON (
|
||||
(
|
||||
builtins.fromJSON (builtins.readFile ./vscode-settings.json)
|
||||
) // {
|
||||
# NixOS-specific vscode settings:
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"terminal.external.linuxExec" = "x-terminal-emulator";
|
||||
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
|
||||
"update.mode" = "none";
|
||||
}
|
||||
);
|
||||
|
||||
boot.loader.timeout = 1;
|
||||
};
|
||||
}
|
||||
|
|
35
modules/desktop/vscode.nix
Normal file
35
modules/desktop/vscode.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-extensions; [
|
||||
esbenp.prettier-vscode
|
||||
jnoortheen.nix-ide
|
||||
ms-azuretools.vscode-docker
|
||||
# ms-python.python # currently broken (2023-10-26)
|
||||
redhat.vscode-yaml
|
||||
shardulm94.trailing-spaces
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
environment.etc."my-settings.sh".text = ''
|
||||
mkdir -p ~/.config/Code/User
|
||||
ln -sf /etc/vscode-settings.json ~/.config/Code/User/settings.json
|
||||
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
|
||||
'';
|
||||
|
||||
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
|
||||
environment.etc."vscode-settings.json".text = builtins.toJSON (
|
||||
(
|
||||
builtins.fromJSON (builtins.readFile ./vscode-settings.json)
|
||||
) // {
|
||||
# NixOS-specific vscode settings:
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"terminal.external.linuxExec" = "x-terminal-emulator";
|
||||
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
|
||||
"update.mode" = "none";
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue