-{ 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;
}