nix: update input secrets
[sourcephile-nix.git] / nixos / profiles / hardware / apu2e4.nix
index 6ddf44b24fb3d54f15516647f1418f7100bb54d2..1a1c62c5c4f5919e1a599702f0df3eaa71a4c1ba 100644 (file)
@@ -1,19 +1,16 @@
 { pkgs, lib, config, ... }:
 {
 hardware.cpu.amd.updateMicrocode = true;
-nix = {
-  # Too CPU hungry for the APU2, for too little Mio saved
-  autoOptimiseStore = false;
-  maxJobs = 4;
-};
+
+# Too CPU hungry for this hardware, for too little Mio saved
+nix.settings.auto-optimise-store = false;
+
 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
 
-boot.kernel = {
-  sysctl = {
-    # Recommended to improve performance when RAM is sufficient.
-    "vm.swappiness" = lib.mkDefault 10;
-  };
-};
+# https://insanity.industries/post/sata-power-consumption/
+services.udev.extraRules = ''
+  SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="med_power_with_dipm"
+'';
 
 boot.loader = {
   grub = {
@@ -52,14 +49,16 @@ boot.initrd = {
     "uas"
     # Ethernet driver
     "igb"
-    # Made the AES modules available at initrd,
+    # Make the AES modules available at initrd,
     # to speedup the deciphering of the root.
-    "aes_x86_64"
+    #"aes_x86_64"
     "aesni_intel"
     "cryptd"
   ];
   kernelModules = [
     "igb"
+    # Enable boot from SD card
+    "sdhci_pci"
   ];
 };
 
@@ -68,7 +67,7 @@ boot.kernelParams = [
   #"console=tty0"
   "console=ttyS0,115200n8"
   # Use arc_summary to print stats
-  "zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
+  #"zfs.zfs_arc_max=${toString (500 * 1024 * 1024)}" # bytes
 ];
 
 environment.systemPackages = [