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