]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/apu2e4.nix
mermet: enable miniflux
[sourcephile-nix.git] / nixos / profiles / hardware / apu2e4.nix
1 { pkgs, lib, config, ... }:
2 {
3 hardware.cpu.amd.updateMicrocode = true;
4
5 # Too CPU hungry for this hardware, for too little Mio saved
6 nix.settings.auto-optimise-store = false;
7
8 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
9
10 # https://insanity.industries/post/sata-power-consumption/
11 services.udev.extraRules = ''
12 SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
13 '';
14
15 boot.loader = {
16 grub = {
17 enable = true;
18 version = 2;
19 copyKernels = true;
20 configurationLimit = 1;
21 # efiSupport = true;
22 # In case canTouchEfiVariables doesn't work
23 #efiInstallAsRemovable = 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 };
40 */
41 };
42
43 boot.initrd = {
44 availableKernelModules = [
45 "ahci"
46 "ehci_pci"
47 "sd_mod"
48 "sg"
49 "uas"
50 # Ethernet driver
51 "igb"
52 # Make 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 "igb"
60 ];
61 };
62
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.systemPackages = [
72 pkgs.pciutils
73 pkgs.flashrom
74 ];
75 }