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

View File

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

View File

@@ -9,6 +9,7 @@
mobile03Configuration
intelDrivers
development
thinkpadFanControl
upower
({...}: {
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]
];
};
});
}