global(gui): add pure nvidia workarounds
This commit is contained in:
parent
0beee1c56b
commit
a2dfd20cb1
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,9 @@ in {
|
|||
open = false;
|
||||
};
|
||||
|
||||
# work around broken nvidia hw cursor on wayland
|
||||
environment.variables.WLR_NO_HARDWARE_CURSORS = mkIf (cfg.type == "nvidia") "1";
|
||||
|
||||
specialisation.integratedGraphics = mkIf (cfg.type == "prime") {
|
||||
configuration = {
|
||||
global.gui.type = mkForce (if intel then "intel" else if amdgpu then "amdgpu" else "prime");
|
||||
|
@ -83,8 +86,11 @@ in {
|
|||
boot.initrd.kernelModules =
|
||||
optional amdgpu "amdgpu" ++
|
||||
optional intel "i915" ++
|
||||
optionals nvidia [ "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" ] ++
|
||||
optional (cfg.arc != null) "vfio-pci";
|
||||
|
||||
boot.extraModulePackages = optional nvidia config.boot.kernelPackages.nvidia_x11;
|
||||
|
||||
boot.extraModprobeConfig = mkIf (cfg.arc != null) ''
|
||||
softdep drm pre: vfio-pci
|
||||
options vfio-pci ids=${cfg.arc}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue