]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/dl10j.nix
mermet: dovecot: disable fts_xapian
[sourcephile-nix.git] / nixos / profiles / hardware / dl10j.nix
1 { pkgs, lib, config, ... }:
2 {
3 nixpkgs.hostPlatform = {
4 system = "x86_64-linux";
5 config = "x86_64-unknown-linux-gnu";
6 };
7 _module.args.CPUs = 2;
8 hardware.cpu.intel.updateMicrocode = true;
9 hardware.opengl = {
10 extraPackages = [
11 pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
12 pkgs.vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
13 pkgs.vaapiVdpau
14 pkgs.libvdpau-va-gl
15 ];
16 };
17
18 # Too CPU hungry for this hardware, for too little Mio saved
19 nix.settings.auto-optimise-store = false;
20
21 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
22
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"
26 '';
27
28 boot.loader = {
29 efi = {
30 canTouchEfiVariables = false;
31 efiSysMountPoint = "/boot/efi";
32 };
33 grub = {
34 enable = true;
35 version = 2;
36 copyKernels = true;
37 configurationLimit = 9;
38 efiSupport = true;
39 # Because canTouchEfiVariables doesn't work on this system
40 efiInstallAsRemovable = true;
41 devices = [
42 # Completed in the importing configuration
43 ];
44 /*
45 mirroredBoots = [
46 { devices = [ "${disk_id}" ];
47 path = "/boot${bootnum}";
48 }
49 ];
50 */
51 };
52 };
53
54 boot.initrd = {
55 availableKernelModules = [
56 "ahci"
57 "ehci_pci" # useless ?
58 "i2c_i801" # SMBus
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
64 "uas" # USB storage
65 "xhci_hcd" # USB
66 #"i915" # VGA
67 "igb" # Ethernet
68 # Make the AES modules available at initrd,
69 # to speedup the deciphering of the root.
70 #"aes_x86_64"
71 "aesni_intel"
72 "cryptd"
73 ];
74 kernelModules = [
75 "igb" # Ethernet
76 "nvme" # NVME M.2 disk
77 "rtsx_usb_sdmmc" # SD card
78 "ums_realtek" # SD card
79 ];
80 };
81 boot.kernelModules = [
82 "rtsx_usb_sdmmc" # SD card
83 "ums_realtek" # SD card
84 ];
85 boot.extraModulePackages = [ ];
86 boot.kernelParams = [
87 "gfxpayload=text"
88 "console=ttyS0,115200n8"
89 "console=ttyS1,115200n8"
90 "console=tty0"
91 ];
92
93 # rtlwifi/rtl8188efw.bin
94 hardware.enableRedistributableFirmware = true;
95
96 environment.systemPackages = with pkgs; [
97 pciutils
98 nvme-cli
99 ];
100 }