{ inputs, config, lib, pkgs, modulesPath, ... }: { imports = [ inputs.hardware.nixosModules.common-cpu-intel-cpu-only inputs.hardware.nixosModules.common-gpu-nvidia-nonprime (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; boot.loader = { # use systemd-boot over grub grub.enable = lib.mkForce false; systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; # nvidia # !! you should keep this enabled if you use wayland !! services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia = { package = config.boot.kernelPackages.nvidiaPackages.beta; modesetting.enable = true; powerManagement.enable = true; # this program is (respectfully) a pile of dogshit and is just bloat if using wayland nvidiaSettings = false; }; # VA-API hardware.opengl = { extraPackages = with pkgs; [ nvidia-vaapi-driver ]; }; environment.variables = { LIBVA_DRIVER_NAME= "nvidia"; VDPAU_DRIVER = "nvidia"; # TODO: remove this once nvidia gets their shit together # https://forums.developer.nvidia.com/t/cueglstreamproducerconnect-returns-error-801-on-525-53-driver/233610/20 NVD_BACKEND = "direct"; }; fileSystems."/" = { device = "/dev/disk/by-uuid/08cfbb11-5943-4627-a2fc-fd41ce578027"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/C321-2746"; fsType = "vfat"; }; swapDevices = [ { device = "/dev/disk/by-uuid/04eddb76-4925-4192-a472-1c2c7e4ac9f7"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.end0.useDHCP = lib.mkDefault true; # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }