Compare commits

..

2 Commits

Author SHA1 Message Date
Sam eca3a72a8f install nvidia drivers for sparky 2024-05-29 20:14:20 +01:00
Sam 393c5b6a91 fix screen tearing 2024-05-29 19:49:31 +01:00
1 changed files with 31 additions and 1 deletions

View File

@ -37,6 +37,7 @@ in
timeout = 3; timeout = 3;
}; };
}; };
boot.kernelParams = [ "i915.enable_psr=0" ];
networking = { networking = {
hostName = "sparky"; hostName = "sparky";
@ -44,14 +45,43 @@ in
enableIPv6 = false; enableIPv6 = false;
}; };
services.libinput.enable = true; nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
# Add additional package names here
"nvidia-x11"
"nvidia-settings"
"nvidia-persistenced"
];
services.displayManager.defaultSession = "cinnamon"; services.displayManager.defaultSession = "cinnamon";
services.libinput.enable = true;
services.xserver = { services.xserver = {
enable = true; enable = true;
videoDrivers = [ "nvidia" ];
displayManager.lightdm.enable = true; displayManager.lightdm.enable = true;
exportConfiguration = true;
deviceSection = ''
'';
desktopManager = { desktopManager = {
cinnamon.enable = true; cinnamon.enable = true;
}; };
}; };
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# Load nvidia driver
hardware.nvidia = {
# https://nixos.wiki/wiki/Nvidia
modesetting.enable = true;
powerManagement.enable = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
} }