]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/base/apu2e4.nix
public-inbox: add linky@public-inbox.sourcephile.fr
[sourcephile-nix.git] / nixos / base / apu2e4.nix
1 { pkgs, lib, config, ... }:
2 {
3 hardware.cpu.amd.updateMicrocode = true;
4 nix = {
5 # Too CPU hungry for the APU2, for too little Mio saved
6 autoOptimiseStore = false;
7 maxJobs = 4;
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 # In case canTouchEfiVariables doesn't work
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 /*
39 efi = {
40 canTouchEfiVariables = true;
41 efiSysMountPoint = "/boot/efi";
42 };
43 */
44 };
45
46 boot.initrd = {
47 availableKernelModules = [
48 "ahci"
49 "ehci_pci"
50 "sd_mod"
51 "sg"
52 "uas"
53 # Ethernet driver
54 "igb"
55 # Made the AES modules available at initrd,
56 # to speedup the deciphering of the root.
57 "aes_x86_64"
58 "aesni_intel"
59 "cryptd"
60 ];
61 kernelModules = [
62 "igb"
63 ];
64 };
65 boot.kernelModules = [];
66 boot.extraModulePackages = [];
67 boot.kernelParams = [
68 "gfxpayload=text"
69 #"console=tty0"
70 "console=ttyS0,115200n8"
71 # Use arc_summary to print stats
72 "zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
73 ];
74
75 environment.systemPackages = [
76 pkgs.pciutils
77 pkgs.flashrom
78 ];
79 }