generic-linux-gpu: export setupPackage and drivers from targets.genericLinux.gpu to configuration (#8189)

This commit is contained in:
Kirill Kuznetsov
2025-11-24 18:20:46 +03:00
committed by GitHub
parent 55af952c56
commit b9c0dae3e4

View File

@@ -72,6 +72,18 @@
`NIX_STATE_DIR` environment variable.
'';
};
setupPackage = mkOption {
type = types.package;
readOnly = true;
description = "Resulting setup package.";
};
drivers = mkOption {
type = types.package;
readOnly = true;
description = "Resulting drivers package.";
};
};
config =
@@ -101,7 +113,6 @@
inherit (cfg) nixStateDirectory;
nonNixosGpuEnv = drivers;
};
in
lib.mkIf cfg.enable {
assertions = lib.optionals cfg.nvidia.enable [
@@ -149,6 +160,10 @@
warnEcho " sudo ${setupPath}"
fi
'';
targets.genericLinux.gpu = {
inherit setupPackage drivers;
};
};
meta.maintainers = with lib.hm.maintainers; [ exzombie ];