Switch london back to nvidia

This commit is contained in:
Victor Mignot 2024-04-22 13:05:52 +02:00
parent 5724c4aa33
commit c25ab8f4de
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
4 changed files with 18 additions and 6 deletions

View file

@ -13,7 +13,6 @@
"usbhid"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
@ -71,7 +70,7 @@
allowUnfreePackages = true;
# Hardware acceleration
hwAccelerationGPU = "amd";
hwAccelerationGPU = "nvidia";
keymap = "fr";

View file

@ -26,11 +26,11 @@ with lib;
hardware.opengl = {
enable = config.hwAccelerationGPU != null;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
(mkIf (config.hwAccelerationGPU == "intel") intel-media-driver)
(mkIf (config.hwAccelerationGPU == "intel") intel-compute-runtime)
(mkIf (config.hwAccelerationGPU == "nvidia") libvdpau-va-gl)
(mkIf (config.hwAccelerationGPU == "nvidia") vaapiVdpau)
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-validation-layers)
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-headers)
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-caps-viewer)
@ -39,6 +39,12 @@ with lib;
];
};
services.xserver.videoDrivers = mkIf (config.hwAccelerationGPU == "nvidia") [ "nouveau" ];
services.xserver.videoDrivers = mkIf (config.hwAccelerationGPU == "nvidia") [ "nvidia" ];
hardware.nvidia = mkIf (config.hwAccelerationGPU == "nvidia") {
modesetting.enable = true;
open = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
}

View file

@ -9,6 +9,7 @@
with lib;
let
isQwerty = keymap == "us";
wlrRendererLine = if nvidiaGPU then "export WLR_RENDERER=vulkan" else "";
gnomeSchema = "org.gnome.desktop.interface";
monitorModule = types.submodule {
options = {
@ -26,7 +27,9 @@ in
config.wayland.windowManager.sway = mkIf config.desktop.enableSwayStack {
enable = true;
package = null;
systemd.enable = false;
checkConfig = false;
config = rec {
modifier = "Mod4";

View file

@ -2,8 +2,12 @@
lib,
pkgs,
config,
nvidiaGPU,
...
}:
let
unsupportedGPUFlag = if nvidiaGPU then "--unsupported-gpu" else "";
in
with lib;
{
options.enableFishShell = mkOption { type = types.bool; };
@ -27,7 +31,7 @@ with lib;
shellInit = ''
set -g theme_color_scheme nord
if [ -z $DISPLAY ] && [ "$(tty)" = /dev/tty1 ]
exec ${pkgs.sway}/bin/.sway-wrapped
exec ${pkgs.sway}/bin/.sway-wrapped ${unsupportedGPUFlag}
end
'';
};