xmonad: rofi: import more environment variables
[julm/julm-nix.git] / nixos / profiles / hardware / apu6b4.nix
index 456941bd616dc86d3fd890cec18c49a1cc192807..6ab46c265a4369b83930689cce2380e95f9ccb2d 100644 (file)
@@ -1,11 +1,22 @@
-{ pkgs, lib, ... }:
 {
-  hardware.cpu.amd.updateMicrocode = true;
+  pkgs,
+  lib,
+  config,
+  ...
+}:
+with lib;
+{
 
-  # 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 +26,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;
         # Completed in the importing configuration
       ];
       /*
-        mirroredBoots = [
-      { devices = [ "${disk_id}" ];
-        path    = "/boot${bootnum}";
-      }
-        ];
+          mirroredBoots = [
+        { devices = [ "${disk_id}" ];
+          path    = "/boot${bootnum}";
+        }
+          ];
       */
     };
     /*
@@ -56,7 +66,7 @@
     ];
   };
 
-  boot.consoleLogLevel = lib.mkDefault 7;
+  boot.consoleLogLevel = mkDefault 7;
   boot.kernelParams = [
     "gfxpayload=text"
     "console=ttyS0,115200n8"