]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/dl10j.nix
mermet: calibre: fix ExecStart=
[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 copyKernels = true;
36 configurationLimit = 9;
37 efiSupport = true;
38 # Because canTouchEfiVariables doesn't work on this system
39 efiInstallAsRemovable = true;
40 devices = [
41 # Completed in the importing configuration
42 ];
43 /*
44 mirroredBoots = [
45 { devices = [ "${disk_id}" ];
46 path = "/boot${bootnum}";
47 }
48 ];
49 */
50 };
51 };
52
53 boot.initrd = {
54 availableKernelModules = [
55 "ahci"
56 "ehci_pci" # useless ?
57 "i2c_i801" # SMBus
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
63 "uas" # USB storage
64 "xhci_hcd" # USB
65 #"i915" # VGA
66 "igb" # Ethernet
67 # Make the AES modules available at initrd,
68 # to speedup the deciphering of the root.
69 #"aes_x86_64"
70 "aesni_intel"
71 "cryptd"
72 ];
73 kernelModules = [
74 "igb" # Ethernet
75 "nvme" # NVME M.2 disk
76 "rtsx_usb_sdmmc" # SD card
77 "ums_realtek" # SD card
78 ];
79 };
80 boot.kernelModules = [
81 "rtsx_usb_sdmmc" # SD card
82 "ums_realtek" # SD card
83 ];
84 boot.extraModulePackages = [ ];
85 boot.kernelParams = [
86 "gfxpayload=text"
87 "console=ttyS0,115200n8"
88 "console=ttyS1,115200n8"
89 "console=tty0"
90 ];
91
92 # rtlwifi/rtl8188efw.bin
93 hardware.enableRedistributableFirmware = true;
94
95 environment.systemPackages = with pkgs; [
96 pciutils
97 nvme-cli
98 ];
99 }