]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/apu2e4.nix
postgresql: log connections
[sourcephile-nix.git] / nixos / profiles / hardware / 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
66 boot.kernelParams = [
67 "gfxpayload=text"
68 #"console=tty0"
69 "console=ttyS0,115200n8"
70 # Use arc_summary to print stats
71 "zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
72 ];
73
74 environment.systemPackages = [
75 pkgs.pciutils
76 pkgs.flashrom
77 ];
78 }