{ inputs, config, lib, pkgs, modulesPath, ... }: { imports = [ inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-pc-laptop-ssd inputs.hardware.nixosModules.common-pc-laptop # this will override your kernel!!! # use this on macs with t2 chips to get screen, keyboard, trackpad, # camera, touchbar, and experimental suspend and audio inputs.hardware.nixosModules.apple-t2 (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; }; # support power features such as suspend to ram powerManagement.enable = true; # tune power saving options on boot powerManagement.powertop.enable = true; # thermald proactively prevents overheating on intel CPUs and works well with other tools services.thermald.enable = true; # power-profile-daemon for power management services.power-profiles-daemon.enable = true; # manage fans for macbook devices services.mbpfan.enable = true; # better performance than the actual intel driver services.xserver.videoDrivers = [ "modesetting" ]; # needed for our broadcom/brcm 4377b chip to work hardware.firmware = with pkgs; [ my.apple-firmware ]; # VA-API hardware.opengl = { extraPackages = with pkgs; [ intel-media-driver intel-vaapi-driver libvdpau-va-gl ]; extraPackages32 = with pkgs.pkgsi686Linux; [ intel-media-driver intel-vaapi-driver libvdpau-va-gl ]; }; environment.variables = { LIBVA_DRIVER_NAME= "iHD"; VDPAU_DRIVER = "va_gl"; # VA-API on firefox MOZ_DISABLE_RDD_SANDBOX = "1"; }; environment.systemPackages = with pkgs; [ intel-gpu-tools ]; boot.kernelParams = [ # enable the i915 sandybridge framebuffer compression (475mw savings) "i915.i915_enable_fbc=1" "i915.fastboot=1" "enable_gvt=1" ]; fileSystems."/" = { device = "/dev/disk/by-uuid/0f09afdc-88e4-4764-818b-77828931278f"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/5659-4909"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; swapDevices = [ { device = "/dev/disk/by-uuid/f54a2257-f498-4ca0-82af-58f31705cce7"; } ]; # 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; }