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

@@ -6,4 +6,19 @@
default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id;
readOnly = true;
};
options.wrapApp = lib.mkOption {
type = lib.types.raw;
default =
pkg: flags:
if config.lib ? nixGL then
pkg.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/${pkg.meta.mainProgram} --add-flags "${flags}"
'';
})
else
pkg;
readOnly = true;
};
}