home-manager: install through NixOS
[sourcephile-nix.git] / nixos / profiles / hardware / dl10j.nix
index 26be42d52932d4da512ac3dbd5cff8665358156e..b488e437a487b06ba7750548a389e8b9738f5c99 100644 (file)
@@ -1,26 +1,24 @@
-{ pkgs, lib, config, ... }:
+{ pkgs, lib, config, host, ... }:
 {
 hardware.cpu.intel.updateMicrocode = true;
 nix = {
   # Too CPU hungry for the DL10J, for too little Mio saved
   autoOptimiseStore = false;
-  maxJobs = 2;
+  maxJobs = host.CPUs;
 };
 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
 
-boot.kernel = {
-  sysctl = {
-    "vm.swappiness" = 10;
-    "vm.vfs_cache_pressure" = 50;
-  };
-};
+# 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 = {
     enable = true;
     version = 2;
     copyKernels = true;
-    configurationLimit = 1;
+    configurationLimit = 9;
     efiSupport = true;
     # Because canTouchEfiVariables doesn't work on this system
     efiInstallAsRemovable = true;
@@ -55,9 +53,9 @@ boot.initrd = {
     "xhci_hcd" # USB
     #"i915" # VGA
     "igb" # Ethernet
-    # 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"
   ];
@@ -74,13 +72,13 @@ boot.kernelParams = [
   "console=ttyS0,115200n8"
   "console=ttyS1,115200n8"
   "console=tty0"
-  # Use arc_summary to print stats
-  "zfs.zfs_arc_max=${toString (1000 * 1024 * 1024)}" # bytes
 ];
 
+# rtlwifi/rtl8188efw.bin
+hardware.enableRedistributableFirmware = true;
+
 environment.systemPackages = with pkgs; [
   pciutils
-  #flashrom
   nvme-cli
 ];
 }