feat: add vscode again, to get the best experience of copilot chat

This commit is contained in:
Ryan Yin
2024-01-30 21:41:30 +08:00
parent 0695229e9d
commit 5c92c0e0ac
3 changed files with 52 additions and 5 deletions

View File

@@ -58,5 +58,34 @@
enableGnomeExtensions = false;
package = pkgs.firefox-wayland; # firefox with wayland support
};
vscode = {
enable = true;
# let vscode sync and update its configuration & extensions across devices, using github account.
userSettings = {};
package =
(pkgs.vscode.override
{
isInsiders = true;
commandLineArgs = [
# "--disable-gpu"
# make it use text-input-v1, which works for kwin 5.27 and weston
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--enable-wayland-ime"
# TODO: fix https://github.com/microsoft/vscode/issues/187436
# still not works...
"--password-store=gnome" # use gnome-keyring as password store
];
})
.overrideAttrs (oldAttrs: rec {
# Use VSCode Insiders to fix crash: https://github.com/NixOS/nixpkgs/issues/246509
src = builtins.fetchTarball {
url = "https://update.code.visualstudio.com/latest/linux-x64/insider";
sha256 = "0k2sh7rb6mrx9d6bkk2744ry4g17d13xpnhcisk4akl4x7dn6a83";
};
version = "latest";
});
};
};
}