]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/apu2e4.nix
mermet: dovecot: disable fts_xapian
[sourcephile-nix.git] / nixos / profiles / hardware / apu2e4.nix
1 { pkgs, lib, config, ... }:
2 {
3
4 nixpkgs.hostPlatform = {
5 system = "x86_64-linux";
6 config = "x86_64-unknown-linux-gnu";
7 };
8 _module.args.CPUs = 4;
9 hardware.cpu.amd.updateMicrocode = true;
10
11 # Too CPU hungry for this hardware, for too little Mio saved
12 nix.settings.auto-optimise-store = false;
13
14 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
15
16 # https://insanity.industries/post/sata-power-consumption/
17 services.udev.extraRules = ''
18 SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
19 '';
20
21 boot.loader = {
22 grub = {
23 enable = true;
24 version = 2;
25 copyKernels = true;
26 configurationLimit = 1;
27 # efiSupport = true;
28 # In case canTouchEfiVariables doesn't work
29 #efiInstallAsRemovable = true;
30 devices = [
31 # Completed in the importing configuration
32 ];
33 /*
34 mirroredBoots = [
35 { devices = [ "${disk_id}" ];
36 path = "/boot${bootnum}";
37 }
38 ];
39 */
40 };
41 /*
42 efi = {
43 canTouchEfiVariables = true;
44 efiSysMountPoint = "/boot/efi";
45 };
46 */
47 };
48
49 boot.initrd = {
50 availableKernelModules = [
51 "ahci"
52 "ehci_pci"
53 "sd_mod"
54 "sg"
55 "uas"
56 # Ethernet driver
57 "igb"
58 # Make 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"
66 # Enable boot from SD card
67 "sdhci_pci"
68 ];
69 };
70
71 boot.kernelParams = [
72 "gfxpayload=text"
73 #"console=tty0"
74 "console=ttyS0,115200n8"
75 # Use arc_summary to print stats
76 #"zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
77 ];
78
79 environment.systemPackages = [
80 pkgs.pciutils
81 pkgs.flashrom
82 ];
83 }