login: use yescrypt crypt-method
[julm/julm-nix.git] / nixos / profiles / hardware / thinkpad.nix
index f785f0b8abc76a184c7e1bdddc2d3527ec51f0bc..6534bda4502f7f99ad0650692780e9e6d072b011 100644 (file)
@@ -1,47 +1,56 @@
-{ config, lib, pkgs, ... }:
+{ lib, pkgs, ... }:
+with lib;
 {
-boot.cleanTmpDir = true;
-boot.tmpOnTmpfs = true;
-
-boot.kernelModules = [ "kvm-intel" ];
-# https://bugzilla.kernel.org/show_bug.cgi?id=110941
-boot.kernelParams = [ "intel_pstate=no_hwp" ];
-
-boot.initrd.availableKernelModules = [
-  "ahci"
-  "drbg"
-  "ehci_pci"
-  "gf128mul"
-  "hmac"
-  "sd_mod"
-];
-
-hardware.cpu.intel.updateMicrocode = true;
-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
-];
-
-powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
-
-services.thinkfan = {
-  enable = true;
-  smartSupport = true;
-  levels = [
-    [0     0      57]
-    [1     56     60]
-    [2     59     63]
-    [3     62     65]
-    [4     64     67]
-    [5     66     72]
-    [6     71     78]
-    [7     77     82]
-    [127   81     32767]
+  imports = [
+    ../acpid.nix
+    ../tlp.nix
   ];
-};
 
-# No pstore backend available on this system.
-systemd.services.mount-pstore.enable = false;
+  powerManagement.cpuFreqGovernor = mkDefault "ondemand";
+
+  boot.cleanTmpDir = true;
+  boot.tmpOnTmpfs = true;
+
+  boot.kernelModules = [ "kvm-intel" ];
+  # https://bugzilla.kernel.org/show_bug.cgi?id=110941
+  boot.kernelParams = [ "intel_pstate=no_hwp" ];
+
+  boot.initrd.availableKernelModules = [
+    "ahci"
+    "drbg"
+    "ehci_pci"
+    "gf128mul"
+    "hmac"
+    "sd_mod"
+  ];
+
+  hardware.cpu.intel.updateMicrocode = true;
+  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
+  ];
+
+  services.upower.enable = true;
+  #services.thermald.enable = true;
+
+  services.thinkfan = {
+    enable = true;
+    smartSupport = true;
+    levels = [
+      [ 0 0 57 ]
+      [ 1 56 60 ]
+      [ 2 59 63 ]
+      [ 3 62 65 ]
+      [ 4 64 67 ]
+      [ 5 66 72 ]
+      [ 6 71 78 ]
+      [ 7 77 82 ]
+      [ 127 81 32767 ]
+    ];
+  };
+
+  # No pstore backend available on this system.
+  systemd.services.mount-pstore.enable = false;
 }