mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
fix: correctly install proprietary nvidia drivers
This commit is contained in:
parent
f4ce8e31b4
commit
f889514d7d
1 changed files with 18 additions and 0 deletions
|
@ -46,6 +46,24 @@ in
|
||||||
powerManagement.finegrained = false;
|
powerManagement.finegrained = false;
|
||||||
open = true;
|
open = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
nvidiaSettings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = lib.mkIf cfg.nvidia.enable [ "nvidia" ];
|
||||||
|
|
||||||
|
liminalOS.config.extraUnfreePackages = lib.mkIf cfg.nvidia.enable [
|
||||||
|
"nvidia-x11"
|
||||||
|
"nvidia-settings"
|
||||||
|
];
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion =
|
||||||
|
!cfg.nvidia.enable
|
||||||
|
|| (config.liminalOS.config.allowUnfree && cfg.nvidia.enable)
|
||||||
|
|| cfg.nvidia.suppressUnfreeWarning;
|
||||||
|
message = "You enabled Nvidia proprietary driver installation but did not allow unfree packages to be installed! Consider setting liminalOS.config.allowUnfree = true or nixpkgs.config.allowUnfree = true. If you are using an allowUnfreePredicate to whitelist these packages manually, you can set liminalOS.system.graphics.nvidia.suppressUnfreeWarning = true";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue