1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,18 @@
`NIX_STATE_DIR` environment variable. `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 = config =
@ -101,7 +113,6 @@
inherit (cfg) nixStateDirectory; inherit (cfg) nixStateDirectory;
nonNixosGpuEnv = drivers; nonNixosGpuEnv = drivers;
}; };
in in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
assertions = lib.optionals cfg.nvidia.enable [ assertions = lib.optionals cfg.nvidia.enable [
@ -149,6 +160,10 @@
warnEcho " sudo ${setupPath}" warnEcho " sudo ${setupPath}"
fi fi
''; '';
targets.genericLinux.gpu = {
inherit setupPackage drivers;
};
}; };
meta.maintainers = with lib.hm.maintainers; [ exzombie ]; meta.maintainers = with lib.hm.maintainers; [ exzombie ];