home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

thinkpad.nix (1635B)


      1 { config, pkgs, ... }:
      2 {
      3   boot = {
      4     blacklistedKernelModules = [
      5       # Kernel GPU Savings Options (NOTE i915 chipset only)
      6       "sierra_net"
      7       "cdc_mbim"
      8       "cdc_ncm"
      9     ];
     10     extraModprobeConfig = ''
     11       options snd_hda_intel power_save=1
     12     '';
     13     initrd = {
     14       availableKernelModules = [ "ehci_pci" "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" "aesni-intel" "cryptd" ];
     15     };
     16     kernelModules = [ "kvm_intel" ];
     17     kernelParams = [
     18       # Kernel GPU Savings Options (NOTE i915 chipset only)
     19       "i915.enable_rc6=1"
     20       "i915.enable_fbc=1"
     21       "i915.lvds_use_ssc=0"
     22       "drm.debug=0"
     23       "drm.vblankoffdelay=1"
     24       "kvm_intel.nested=1"
     25       "intel_iommu=on"
     26     ];
     27     loader.efi.canTouchEfiVariables = true;
     28   };
     29   hardware = {
     30     trackpoint.enable = false;
     31     cpu.intel.updateMicrocode = true;
     32     opengl.extraPackages = with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl intel-media-driver ];
     33   };
     34   services = {
     35     acpid = {
     36       enable = true;
     37     };
     38     xserver = {
     39       synaptics.enable = false;
     40       config =
     41         ''
     42           Section "InputClass"
     43             Identifier     "Enable libinput for TrackPoint"
     44             MatchIsPointer "on"
     45             Driver         "libinput"
     46             Option         "ScrollMethod" "button"
     47             Option         "ScrollButton" "8"
     48           EndSection
     49         '';
     50       inputClassSections = [
     51         ''
     52           Identifier "evdev touchpad off"
     53           MatchIsTouchpad "on"
     54           MatchDevicePath "/dev/input/event*"
     55           Driver "evdev"
     56           Option "Ignore" "true"
     57         ''
     58       ];
     59     };
     60   };
     61 }