mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2026-04-27 07:48:44 +02:00
harware/graphics: add nvidia and rename to gpu
Some checks are pending
/ Build Nix targets (push) Waiting to run
Some checks are pending
/ Build Nix targets (push) Waiting to run
This commit is contained in:
parent
2a44b8e852
commit
7909067dc7
4 changed files with 13 additions and 20 deletions
|
|
@ -10,11 +10,12 @@ in
|
|||
{
|
||||
options.my.hardware.graphics = {
|
||||
enable = lib.mkEnableOption "graphics configuration";
|
||||
cpuFlavor = lib.mkOption {
|
||||
gpuFlavor = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"amd"
|
||||
"intel"
|
||||
"nvidia"
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
|
|
@ -29,7 +30,7 @@ in
|
|||
hardware.graphics.enable = true;
|
||||
}
|
||||
# Intel GPU
|
||||
(lib.mkIf (cfg.cpuFlavor == "intel") {
|
||||
(lib.mkIf (cfg.gpuFlavor == "intel") {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
|
@ -41,7 +42,9 @@ in
|
|||
];
|
||||
})
|
||||
|
||||
(lib.mkIf (cfg.cpuFlavor == "amd") {
|
||||
(lib.mkIf (cfg.gpuFlavor == "amd") {
|
||||
})
|
||||
(lib.mkIf (cfg.gpuFlavor == "nvidia") {
|
||||
})
|
||||
]
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue