feat: add nixGL module

This commit is contained in:
Leon Schwarzäugl 2025-03-22 22:35:38 +01:00
parent 9c1df052a2
commit faff8d9ee6
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
5 changed files with 62 additions and 3 deletions

View file

@ -0,0 +1,17 @@
{ lib, config, nixgl, ... }:
{
nixGL = lib.mkIf (!config.swarselsystems.isNixos) {
inherit (nixgl) packages;
defaultWrapper = lib.mkDefault "mesa";
vulkan.enable = lib.mkDefault false;
prime = lib.mkIf config.swarselsystem.isSecondaryGpu {
card = config.swarselsystem.secondaryGpuCard;
installScript = "mesa";
};
offloadWrapper = lib.mkIf config.swarselsystem.isSecondaryGpu "mesaPrime";
installScripts = [
"mesa"
"mesaPrime"
];
};
}