]> Git — Sourcephile - sourcephile-nix.git/blob - base/dl10j.nix
knot+nginx: add lemoutona5pattes.sourcephile.fr for helping Cadine
[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 "nvme" # NVME M.2 disk
51 #"rtl8188ee" # Wireless
52 "rtsx_usb_sdmmc" # SD card
53 #"snd_hda_intel" # Audio
54 "uas" # USB storage
55 "xhci_hcd" # USB
56 #"i915" # VGA
57 "igb" # Ethernet
58 # Made the AES modules available at initrd,
59 # to speedup the deciphering of the root.
60 "aes_x86_64"
61 "aesni_intel"
62 "cryptd"
63 ];
64 kernelModules = [
65 "igb" # Ethernet
66 "nvme" # NVME M.2 disk
67 "rtsx_usb_sdmmc" # SD card
68 ];
69 };
70 boot.kernelModules = [ ];
71 boot.extraModulePackages = [ ];
72 boot.kernelParams = [
73 "gfxpayload=text"
74 "console=ttyS0,115200n8"
75 "console=ttyS1,115200n8"
76 "console=tty0"
77 # Use arc_summary to print stats
78 "zfs.zfs_arc_max=${toString (1000 * 1024 * 1024)}" # bytes
79 ];
80
81 environment.systemPackages = with pkgs; [
82 pciutils
83 #flashrom
84 nvme-cli
85 ];
86 }