Update thinkfan config

This commit is contained in:
Thomas Avé 2025-12-03 15:51:11 +07:00
parent c4c472f655
commit d92f99bc5c
4 changed files with 87 additions and 2 deletions

View File

@ -6,6 +6,7 @@ let
zlib zlib
zstd zstd
stdenv.cc.cc stdenv.cc.cc
stdenv.cc.cc.lib
curl curl
openssl openssl
attr attr

View File

@ -22,6 +22,31 @@ in {
}; };
services.throttled.enable = true; services.throttled.enable = true;
services.thinkfan.enable = true; services.thinkfan.enable = true;
services.thinkfan.settings = {
sensors = [
# Search for 'coretemp' anywhere in /sys/class/hwmon
{ hwmon = "/sys/class/hwmon"; name = "coretemp"; indices = [ 1 ]; }
# Search for 'acpitz'
{ hwmon = "/sys/class/hwmon"; name = "acpitz"; indices = [ 1 ]; }
# Search for 'nvme'
{ hwmon = "/sys/class/hwmon"; name = "nvme"; indices = [ 1 ]; }
];
fans = [
{ tpacpi = "/proc/acpi/ibm/fan"; }
];
levels = [
[ 0 0 45 ]
[ 1 42 55 ]
[ 2 50 60 ]
[ 3 56 68 ]
[ 5 64 78 ]
[ 7 76 95 ]
];
};
programs.steam = { programs.steam = {
enable = true; enable = true;

View File

@ -11,7 +11,10 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ config.boot.kernelPackages.tp_smapi ];
boot.extraModprobeConfig = ''
options thinkpad_acpi fan_control=1
'';
fileSystems."/" = fileSystems."/" =
{ device = "rpool/root"; { device = "rpool/root";

View File

@ -7,7 +7,63 @@
security.rtkit.enable = true; security.rtkit.enable = true;
programs.zsh.enable = true; programs.zsh.enable = true;
networking.firewall.enable = false; networking.firewall.enable = false;
programs.nix-ld.enable = true; programs.nix-ld = {
enable = true;
libraries = with pkgs; [
# Toolchain / C++ runtime
stdenv.cc.cc # libc, libgcc, libstdc++
stdenv.cc.cc.lib # sometimes needed explicitly
# Compression / archive
zlib
zstd
xz
bzip2
# Crypto / TLS / networking
openssl
curl
libssh
# Core system libs
attr
acl
util-linux
libsodium
systemd # libudev, libsystemd
libxml2
expat
# Graphics / X11 / desktop
xorg.libX11
xorg.libXext
xorg.libXfixes
xorg.libXdamage
xorg.libXcomposite
xorg.libXrandr
xorg.libxcb
libdrm
mesa
libxkbcommon
# Audio / desktop integration
alsa-lib
dbus
cups
# GLib / GTK stack (lots of GUI apps, Electron, etc.)
glib
gdk-pixbuf
pango
cairo
atk
gtk3
# NSS/NSPR (Firefox, Electron, many apps)
nspr
nss
];
};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.memtest86.enable = true; boot.loader.systemd-boot.memtest86.enable = true;