feat: add 'vscode' module to work host
This commit is contained in:
19
home/modules/vscode.nix
Normal file
19
home/modules/vscode.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
needsNixGL = config.lib ? nixGL;
|
||||
vscode =
|
||||
if needsNixGL then
|
||||
pkgs.vscode.overrideAttrs (old: {
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
wrapProgram $out/bin/code --add-flags "--disable-gpu-sandbox"
|
||||
'';
|
||||
})
|
||||
else
|
||||
pkgs.vscode;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
home.packages = [ (config.nixgl.wrap vscode) ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user