nix: cleanups
[sourcephile-nix.git] / nixos / profiles / hardware / dl10j.nix
index cd3b4a3d72fb3054982f9f85f2dea17b9552d7eb..9e9af14ea73797df6b16709a207a32391677403a 100644 (file)
@@ -1,11 +1,18 @@
-{ pkgs, lib, config, machine, ... }:
+{ pkgs, lib, config, ... }:
 {
 hardware.cpu.intel.updateMicrocode = true;
-nix = {
-  # Too CPU hungry for the DL10J, for too little Mio saved
-  autoOptimiseStore = false;
-  maxJobs = machine.CPUs;
+hardware.opengl = {
+  extraPackages = [
+    pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
+    pkgs.vaapiIntel         # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+    pkgs.vaapiVdpau
+    pkgs.libvdpau-va-gl
+  ];
 };
+
+# Too CPU hungry for this hardware, for too little Mio saved
+nix.autoOptimiseStore = false;
+
 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
 
 # https://insanity.industries/post/sata-power-consumption/
@@ -14,6 +21,10 @@ services.udev.extraRules = ''
 '';
 
 boot.loader = {
+  efi = {
+    canTouchEfiVariables = false;
+    efiSysMountPoint = "/boot/efi";
+  };
   grub = {
     enable = true;
     version = 2;
@@ -33,10 +44,6 @@ boot.loader = {
     ];
     */
   };
-  efi = {
-    canTouchEfiVariables = false;
-    efiSysMountPoint = "/boot/efi";
-  };
 };
 
 boot.initrd = {
@@ -63,9 +70,13 @@ boot.initrd = {
     "igb" # Ethernet
     "nvme" # NVME M.2 disk
     "rtsx_usb_sdmmc" # SD card
+    "ums_realtek" # SD card
   ];
 };
-boot.kernelModules = [ ];
+boot.kernelModules = [
+  "rtsx_usb_sdmmc" # SD card
+  "ums_realtek" # SD card
+];
 boot.extraModulePackages = [ ];
 boot.kernelParams = [
   "gfxpayload=text"