(re)switch to Nvidia drivers
This commit is contained in:
parent
c38acd0f0f
commit
783475e2f0
2 changed files with 10 additions and 9 deletions
|
@ -35,6 +35,7 @@ with lib;
|
|||
|
||||
config = {
|
||||
boot.kernelParams = mkIf (gpu == "intel") [ "i915.enable_guc=2" ];
|
||||
services.xserver.videoDrivers = mkIf (gpu == "nvidia") [ "nvidia" ];
|
||||
|
||||
# Small hack as this option path changes between 24.05 and unstable
|
||||
hardware.${hwAccelerationOptionPath} = {
|
||||
|
@ -48,5 +49,12 @@ with lib;
|
|||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = mkIf (gpu == "nvidia") {
|
||||
enable = true;
|
||||
open = true;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,14 +9,6 @@
|
|||
with lib;
|
||||
let
|
||||
isQwerty = keymap == "us";
|
||||
wlrRendererLine =
|
||||
if isNvidiaGpu then
|
||||
''
|
||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||
export NOUVEAU_USE_ZINK=1
|
||||
''
|
||||
else
|
||||
"";
|
||||
monitorModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption { type = types.str; };
|
||||
|
@ -104,6 +96,8 @@ in
|
|||
package = null;
|
||||
checkConfig = false;
|
||||
|
||||
extraOptions = if isNvidiaGpu then [ "--unsupported-gpu" ] else [ ];
|
||||
|
||||
config = rec {
|
||||
modifier = "Mod4";
|
||||
|
||||
|
@ -305,7 +299,6 @@ in
|
|||
xwayland = true;
|
||||
|
||||
extraSessionCommands = ''
|
||||
${wlrRendererLine}
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
|
Loading…
Add table
Reference in a new issue