mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
generic-linux-gpu: export setupPackage and drivers from targets.genericLinux.gpu to configuration (#8189)
This commit is contained in:
@@ -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 ];
|
||||
|
||||
Reference in New Issue
Block a user