]> Git — Sourcephile - sourcephile-nix.git/blob - base/apu2e4.nix
nix: revamp the config paths
[sourcephile-nix.git] / 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 # efiSupport = true;
24 devices = [
25 # Completed in the importing configuration
26 ];
27 /*
28 mirroredBoots = [
29 { devices = [ "${disk_id}" ];
30 path = "/boot${bootnum}";
31 }
32 ];
33 */
34 };
35 /*
36 efi = {
37 canTouchEfiVariables = true;
38 efiSysMountPoint = "/boot/efi";
39 efiInstallAsRemovable = false;
40 };
41 */
42 };
43
44 boot.initrd = {
45 availableKernelModules = [
46 "ahci"
47 "ehci_pci"
48 "sd_mod"
49 "uas"
50 # Ethernet driver
51 "igb"
52 # Made the AES modules available at initrd,
53 # to speedup the deciphering of the root.
54 "aes_x86_64"
55 "aesni_intel"
56 "cryptd"
57 ];
58 kernelModules = [ ];
59
60 };
61 boot.kernelModules = [ ];
62 boot.extraModulePackages = [ ];
63 boot.kernelParams = [
64 "gfxpayload=text"
65 #"console=tty0"
66 "console=ttyS0,115200n8"
67 # Use arc_summary to print stats
68 "zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
69 ];
70
71 environment = {
72 systemPackages = with pkgs; [
73 pciutils
74 flashrom
75 ];
76 };
77 }