]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/dl10j.nix
sanoid: use recursive
[sourcephile-nix.git] / nixos / profiles / hardware / dl10j.nix
1 { pkgs, lib, config, host, ... }:
2 {
3 hardware.cpu.intel.updateMicrocode = true;
4 hardware.opengl = {
5 extraPackages = [
6 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
7 pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
8 pkgs.vaapiVdpau
9 pkgs.libvdpau-va-gl
10 ];
11 };
12 nix = {
13 # Too CPU hungry for the DL10J, for too little Mio saved
14 autoOptimiseStore = false;
15 maxJobs = host.CPUs;
16 };
17 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
18
19 # https://insanity.industries/post/sata-power-consumption/
20 services.udev.extraRules = ''
21 SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
22 '';
23
24 boot.loader = {
25 grub = {
26 enable = true;
27 version = 2;
28 copyKernels = true;
29 configurationLimit = 9;
30 efiSupport = true;
31 # Because canTouchEfiVariables doesn't work on this system
32 efiInstallAsRemovable = true;
33 devices = [
34 # Completed in the importing configuration
35 ];
36 /*
37 mirroredBoots = [
38 { devices = [ "${disk_id}" ];
39 path = "/boot${bootnum}";
40 }
41 ];
42 */
43 };
44 efi = {
45 canTouchEfiVariables = false;
46 efiSysMountPoint = "/boot/efi";
47 };
48 };
49
50 boot.initrd = {
51 availableKernelModules = [
52 "ahci"
53 "ehci_pci" # useless ?
54 "i2c_i801" # SMBus
55 "mei_me" # Communication controller
56 "nvme" # NVME M.2 disk
57 #"rtl8188ee" # Wireless
58 "rtsx_usb_sdmmc" # SD card
59 #"snd_hda_intel" # Audio
60 "uas" # USB storage
61 "xhci_hcd" # USB
62 #"i915" # VGA
63 "igb" # Ethernet
64 # Make the AES modules available at initrd,
65 # to speedup the deciphering of the root.
66 #"aes_x86_64"
67 "aesni_intel"
68 "cryptd"
69 ];
70 kernelModules = [
71 "igb" # Ethernet
72 "nvme" # NVME M.2 disk
73 "rtsx_usb_sdmmc" # SD card
74 "ums_realtek" # SD card
75 ];
76 };
77 boot.kernelModules = [
78 "rtsx_usb_sdmmc" # SD card
79 "ums_realtek" # SD card
80 ];
81 boot.extraModulePackages = [ ];
82 boot.kernelParams = [
83 "gfxpayload=text"
84 "console=ttyS0,115200n8"
85 "console=ttyS1,115200n8"
86 "console=tty0"
87 ];
88
89 # rtlwifi/rtl8188efw.bin
90 hardware.enableRedistributableFirmware = true;
91
92 environment.systemPackages = with pkgs; [
93 pciutils
94 nvme-cli
95 ];
96 }