]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/apu2e4.nix
nix: update to latest nixpkgs
[sourcephile-nix.git] / nixos / profiles / hardware / apu2e4.nix
1 { pkgs, lib, config, host, ... }:
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 = host.CPUs / 2;
8 };
9 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
10
11 # https://insanity.industries/post/sata-power-consumption/
12 services.udev.extraRules = ''
13 SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
14 '';
15
16 boot.loader = {
17 grub = {
18 enable = true;
19 version = 2;
20 copyKernels = true;
21 configurationLimit = 1;
22 # efiSupport = true;
23 # In case canTouchEfiVariables doesn't work
24 #efiInstallAsRemovable = true;
25 devices = [
26 # Completed in the importing configuration
27 ];
28 /*
29 mirroredBoots = [
30 { devices = [ "${disk_id}" ];
31 path = "/boot${bootnum}";
32 }
33 ];
34 */
35 };
36 /*
37 efi = {
38 canTouchEfiVariables = true;
39 efiSysMountPoint = "/boot/efi";
40 };
41 */
42 };
43
44 boot.initrd = {
45 availableKernelModules = [
46 "ahci"
47 "ehci_pci"
48 "sd_mod"
49 "sg"
50 "uas"
51 # Ethernet driver
52 "igb"
53 # Make the AES modules available at initrd,
54 # to speedup the deciphering of the root.
55 #"aes_x86_64"
56 "aesni_intel"
57 "cryptd"
58 ];
59 kernelModules = [
60 "igb"
61 ];
62 };
63
64 boot.kernelParams = [
65 "gfxpayload=text"
66 #"console=tty0"
67 "console=ttyS0,115200n8"
68 # Use arc_summary to print stats
69 #"zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
70 ];
71
72 environment.systemPackages = [
73 pkgs.pciutils
74 pkgs.flashrom
75 ];
76 }