fix: add wrapper util for home manager modules

This commit is contained in:
2026-02-23 15:37:51 +01:00
parent 624a56e948
commit ab59c50520
5 changed files with 20 additions and 28 deletions

View File

@@ -1,19 +1,7 @@
{ 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) ];
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.vscode "--disable-gpu-sandbox")) ];
};
}