From 227a4fe53dc8b62999ba06bb483cf3420007448b Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Mon, 23 Feb 2026 12:36:35 +0100 Subject: [PATCH] feat: add 'vscode' module to work host --- home/hosts/work/default.nix | 1 + home/modules/vscode.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 home/modules/vscode.nix diff --git a/home/hosts/work/default.nix b/home/hosts/work/default.nix index 61cffb4..3717d11 100644 --- a/home/hosts/work/default.nix +++ b/home/hosts/work/default.nix @@ -32,6 +32,7 @@ in ../../modules/music ../../modules/taskwarrior.nix ../../modules/bruno.nix + ../../modules/vscode.nix ]; sops = { diff --git a/home/modules/vscode.nix b/home/modules/vscode.nix new file mode 100644 index 0000000..feae33e --- /dev/null +++ b/home/modules/vscode.nix @@ -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) ]; + }; +}