]> Git — Sourcephile - sourcephile-nix.git/blob - base/dl10j.nix
losurdo: move everything from the SD card to the NVMe
[sourcephile-nix.git] / base / dl10j.nix
1 { pkgs, lib, config, ... }:
2 {
3 hardware.cpu.intel.updateMicrocode = true;
4 nix = {
5 # Too CPU hungry for the DL10J, for too little Mio saved
6 autoOptimiseStore = false;
7 maxJobs = 2;
8 };
9 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
10
11 boot.kernel = {
12 sysctl = {
13 "vm.swappiness" = 10;
14 "vm.vfs_cache_pressure" = 50;
15 };
16 };
17
18 boot.loader = {
19 grub = {
20 enable = true;
21 version = 2;
22 copyKernels = true;
23 configurationLimit = 3;
24 efiSupport = true;
25 # Vecause canTouchEfiVariables doesn't work on this system
26 efiInstallAsRemovable = true;
27 devices = [
28 # Completed in the importing configuration
29 ];
30 /*
31 mirroredBoots = [
32 { devices = [ "${disk_id}" ];
33 path = "/boot${bootnum}";
34 }
35 ];
36 */
37 };
38 efi = {
39 canTouchEfiVariables = false;
40 efiSysMountPoint = "/boot/efi";
41 };
42 };
43
44 boot.initrd = {
45 availableKernelModules = [
46 "ahci"
47 "ehci_pci" # useless ?
48 "i2c_i801" # SMBus
49 "mei_me" # Communication controller
50 #"rtl8188ee" # Wireless
51 "rtsx_usb_sdmmc" # SD card
52 #"snd_hda_intel" # Audio
53 "uas" # USB storage
54 "xhci_hcd" # USB
55 #"i915" # VGA
56 "igb" # Ethernet
57 # Made the AES modules available at initrd,
58 # to speedup the deciphering of the root.
59 "aes_x86_64"
60 "aesni_intel"
61 "cryptd"
62 ];
63 kernelModules = [
64 "igb" # Ethernet
65 "rtsx_usb_sdmmc" # SD card
66 ];
67 };
68 boot.kernelModules = [ ];
69 boot.extraModulePackages = [ ];
70 boot.kernelParams = [
71 "gfxpayload=text"
72 "console=ttyS0,115200n8"
73 "console=ttyS1,115200n8"
74 "console=tty0"
75 # Use arc_summary to print stats
76 "zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
77 ];
78
79 environment.systemPackages = with pkgs; [
80 pciutils
81 #flashrom
82 nvme-cli
83 ];
84 }