refactor(nixGL): extract 'nixGL' wrapper

This commit is contained in:
2026-02-13 11:02:42 +01:00
parent 833d999027
commit 385fcb3ee1
7 changed files with 35 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
{ config, pkgs, ... }:
let
useNixGL = config.lib ? nixGL;
brunoBase =
if useNixGL then
needsNixGL = config.lib ? nixGL;
bruno =
if needsNixGL then
pkgs.bruno.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/bruno --add-flags "--no-sandbox"
@@ -11,10 +11,9 @@ let
})
else
pkgs.bruno;
brunoFinal = if useNixGL then config.lib.nixGL.wrap brunoBase else brunoBase;
in
{
config = {
home.packages = [ brunoFinal ];
home.packages = [ (config.nixgl.wrap bruno) ];
};
}