added a thinkpad fan controller module (because that isnt inbuilt???)

This commit is contained in:
2026-08-26 18:43:18 +01:00
parent ba688432e6
commit 4ba613b95f
4 changed files with 34 additions and 5 deletions

8
flake.lock generated
View File

@@ -374,11 +374,11 @@
"wshowkeys": "wshowkeys" "wshowkeys": "wshowkeys"
}, },
"locked": { "locked": {
"lastModified": 1787685448, "lastModified": 1787750232,
"narHash": "sha256-gvdmxEM49ZE6KqosyKIHsQ6V6NHcYrw9in2TpuFad4I=", "narHash": "sha256-Kx0A+ytaYCyuzdA4ROeFh5kHsgh3N510KdXHuMTRclA=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "0c27e34df40ba4865cb8d9838b80685fc3b79785", "rev": "a85e6b79b88045e91055e2564ffdaab2c8e23f11",
"revCount": 69, "revCount": 74,
"type": "git", "type": "git",
"url": "https://git.voidarc.co.uk/voidarc/hypr" "url": "https://git.voidarc.co.uk/voidarc/hypr"
}, },

View File

@@ -45,6 +45,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gsettings-desktop-schemas gsettings-desktop-schemas
glib
]; ];
system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] '' system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] ''
@@ -83,7 +84,7 @@
hyprland = inputs'.hyprland.packages.default.override { hyprland = inputs'.hyprland.packages.default.override {
flags."--config" = "/run/hypr/config/hyprland.lua"; flags."--config" = "/run/hypr/config/hyprland.lua";
env."MODULES_ROOT" = "/run/hypr/config/modules"; env."MODULES_ROOT" = "/run/hypr/config/modules";
env."HYPRLAND_ROOT" = "/run/hypr/config"; env."HYPRLAND_ROOT" = "/run/hypr/config";
runtimePackages = runtimePackages =
inputs.hyprland.lib.defaultRuntimePkgs.${system} inputs.hyprland.lib.defaultRuntimePkgs.${system}
// { // {

View File

@@ -9,6 +9,7 @@
mobile03Configuration mobile03Configuration
intelDrivers intelDrivers
development development
thinkpadFanControl
upower upower
({...}: { ({...}: {
hyprland.enablePlugins = true; hyprland.enablePlugins = true;

View File

@@ -0,0 +1,27 @@
{
self,
moduleWithSystem,
...
}: {
flake.nixosModules.thinkpadFanControl = moduleWithSystem ({inputs', ...}: {
# Enable fan control for the thinkpad module (why is this not the default??)
boot.extraModprobeConfig = ''
options thinkpad_acpi fan_control=1
'';
services.thinkfan = {
enable = true;
extraArgs = ["-s" "5"];
levels = [
[0 0 55]
[1 50 60]
[3 58 68]
[5 65 75]
[7 73 85]
["level disengaged" 82 32767]
];
};
});
}