courge: wireguard: init
[julm/julm-nix.git] / nixos / profiles / hardware / apu6b4.nix
index 456941bd616dc86d3fd890cec18c49a1cc192807..7dced5c54f02551e7f84ddc8d5bf3a66857ef077 100644 (file)
@@ -1,11 +1,17 @@
-{ pkgs, lib, ... }:
+{ pkgs, lib, config, ... }:
+with lib;
 {
-  hardware.cpu.amd.updateMicrocode = true;
 
-  # Too CPU hungry for this hardware, for too little Mio saved
-  nix.settings.auto-optimise-store = false;
+  nixpkgs.hostPlatform = {
+    system = "x86_64-linux";
+    config = "x86_64-unknown-linux-gnu";
+  };
+  _module.args.CPUs = 4;
+  hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
+  powerManagement.cpuFreqGovernor = mkDefault "ondemand";
 
-  powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
+  # Too CPU hungry for this hardware, for too little MiB saved
+  nix.settings.auto-optimise-store = false;
 
   # https://insanity.industries/post/sata-power-consumption/
   services.udev.extraRules = ''
@@ -15,9 +21,8 @@
   boot.loader = {
     grub = {
       enable = true;
-      version = 2;
       copyKernels = true;
-      configurationLimit = lib.mkDefault 1;
+      configurationLimit = mkDefault 1;
       # efiSupport = true;
       # In case canTouchEfiVariables doesn't work
       #efiInstallAsRemovable = true;
@@ -56,7 +61,7 @@
     ];
   };
 
-  boot.consoleLogLevel = lib.mkDefault 7;
+  boot.consoleLogLevel = mkDefault 7;
   boot.kernelParams = [
     "gfxpayload=text"
     "console=ttyS0,115200n8"