From 7b2d05448b5b09ea0d934cc7dc8d517e8abefcde Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Fri, 25 Feb 2022 18:19:57 +0100 Subject: [PATCH] feat: misc hardware stuff --- nixos/hardware-configuration/capibara.nix | 31 +++++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/nixos/hardware-configuration/capibara.nix b/nixos/hardware-configuration/capibara.nix index ced88bd..8bc5983 100644 --- a/nixos/hardware-configuration/capibara.nix +++ b/nixos/hardware-configuration/capibara.nix @@ -4,14 +4,29 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot = { + initrd = { + kernelModules = [ ]; + availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "usb_storage" + "sd_mod" + "sr_mod" + "sdhci_pci" + ]; + }; + kernelModules = [ "kvm-intel" ]; + kernelParams = + [ "intel_pstate=passive" "i915.enable_fbc=1" "i915.enable_psr=2" ]; + extraModulePackages = [ ]; + }; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware = { + cpu.intel.updateMicrocode = true; + opengl.extraPackages = with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]; + }; }