{ config, modulesPath, pkgs, ... }: { nixpkgs.hostPlatform = "x86_64-linux"; imports = [(modulesPath + "/installer/scan/not-detected.nix")]; boot = { kernelModules = ["kvm-intel" "nvidia-uvm"]; initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; loader = { efi.canTouchEfiVariables = true; timeout = 2; systemd-boot = { enable = true; consoleMode = "max"; configurationLimit = 30; }; }; }; fileSystems = { "/" = { device = "/dev/disk/by-label/NIXROOT"; fsType = "btrfs"; }; "/boot" = { device = "/dev/disk/by-label/NIXBOOT"; fsType = "vfat"; }; }; zramSwap.enable = true; hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware; # NVIDIA settings services.xserver.videoDrivers = ["nvidia"]; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl nvidia-vaapi-driver ]; extraPackages32 = with pkgs; [vaapiVdpau]; }; hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; powerManagement.finegrained = false; open = false; nvidiaSettings = false; # Vulkan is much more stable in Wayland package = config.boot.kernelPackages.nvidiaPackages.stable; }; environment.systemPackages = with pkgs; [ libva-utils nvidia-vaapi-driver nvtop-nvidia pciutils vdpauinfo cudaPackages.cudatoolkit ]; }