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";
37 configurationLimit = 9;
39 # Because canTouchEfiVariables doesn't work on this system
40 efiInstallAsRemovable = true;
42 # Completed in the importing configuration
46 { devices = [ "${disk_id}" ];
47 path = "/boot${bootnum}";
55 availableKernelModules = [
57 "ehci_pci" # useless ?
59 "mei_me" # Communication controller
60 "nvme" # NVME M.2 disk
61 #"rtl8188ee" # Wireless
62 "rtsx_usb_sdmmc" # SD card
63 #"snd_hda_intel" # Audio
68 # Make the AES modules available at initrd,
69 # to speedup the deciphering of the root.
76 "nvme" # NVME M.2 disk
77 "rtsx_usb_sdmmc" # SD card
78 "ums_realtek" # SD card
81 boot.kernelModules = [
82 "rtsx_usb_sdmmc" # SD card
83 "ums_realtek" # SD card
85 boot.extraModulePackages = [ ];
88 "console=ttyS0,115200n8"
89 "console=ttyS1,115200n8"
93 # rtlwifi/rtl8188efw.bin
94 hardware.enableRedistributableFirmware = true;
96 environment.systemPackages = with pkgs; [