zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit c13cd61e88f4efe16753a602fd7fac49a6e6a0e6
parent 7e0e29f71695cab0807528b9025b780743c8f642
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 19 Jun 2025 18:23:08 +0200

config/nixos/modules/hardware/quirks: add thinkpad fan control
1 file changed, 29 insertions(+), 0 deletions(-)
A
config/nixos/modules/hardware/quirks.nix
|
29
+++++++++++++++++++++++++++++
diff --git a/config/nixos/modules/hardware/quirks.nix b/config/nixos/modules/hardware/quirks.nix
@@ -0,0 +1,29 @@
+{
+  povSelf,
+  hostConfig,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options = {
+    thinkpad.enable = {
+      type = types.bool;
+      default = false;
+    };
+  };
+
+  config = lib.mkMerge [
+    (lib.mkIf cfg.thinkpad.enable {
+      boot.extraModprobeConfig = ''
+        options thinkpad_acpi fan_control=1
+      '';
+    })
+  ];
+}