]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/hardware/apu6b4.nix
upower: use instead of powertop which draws ~0.3W more
[julm/julm-nix.git] / nixos / profiles / hardware / apu6b4.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 = lib.mkDefault 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 ];
51 kernelModules = [
52 # Ethernet driver
53 "igb"
54 # Enable to switch to stage-2 from the SD card
55 "sdhci_pci"
56 ];
57 };
58
59 boot.consoleLogLevel = lib.mkDefault 7;
60 boot.kernelParams = [
61 "gfxpayload=text"
62 "console=ttyS0,115200n8"
63 # Use arc_summary to print stats
64 #"zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
65 ];
66
67 environment.systemPackages = [
68 pkgs.flashrom
69 pkgs.pciutils
70 ];
71 }