1 { pkgs, lib, config, ... }:
3 nixpkgs.hostPlatform = {
4 system = "x86_64-linux";
5 config = "x86_64-unknown-linux-gnu";
8 hardware.cpu.intel.updateMicrocode = true;
11 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
12 pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
18 # Too CPU hungry for this hardware, for too little Mio saved
19 nix.settings.auto-optimise-store = false;
21 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
23 # https://insanity.industries/post/sata-power-consumption/
24 services.udev.extraRules = ''
25 SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
30 canTouchEfiVariables = false;
31 efiSysMountPoint = "/boot/efi";
36 configurationLimit = 3;
38 # Because canTouchEfiVariables doesn't work on this system
39 efiInstallAsRemovable = true;
41 # Completed in the importing configuration
45 { devices = [ "${disk_id}" ];
46 path = "/boot${bootnum}";
54 availableKernelModules = [
56 "ehci_pci" # useless ?
58 "mei_me" # Communication controller
59 "nvme" # NVME M.2 disk
60 #"rtl8188ee" # Wireless
61 "rtsx_usb_sdmmc" # SD card
62 #"snd_hda_intel" # Audio
67 # Make the AES modules available at initrd,
68 # to speedup the deciphering of the root.
75 "nvme" # NVME M.2 disk
76 "rtsx_usb_sdmmc" # SD card
77 "ums_realtek" # SD card
80 boot.kernelModules = [
81 "rtsx_usb_sdmmc" # SD card
82 "ums_realtek" # SD card
84 boot.extraModulePackages = [ ];
87 "console=ttyS0,115200n8"
88 "console=ttyS1,115200n8"
92 # rtlwifi/rtl8188efw.bin
93 hardware.enableRedistributableFirmware = true;
95 environment.systemPackages = with pkgs; [