From f88c89feab0e4f2d83830472bc14a361a430c21d Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 4 Mar 2026 14:25:57 +0100 Subject: [PATCH] add fan support for artemis --- machines/artemis/modules.nix | 1 + modules/hardware/default.nix | 1 + modules/hardware/fans.nix | 38 ++++++++++++++++++++++++++++++ modules/wm/hyprland/animations.nix | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 modules/hardware/fans.nix diff --git a/machines/artemis/modules.nix b/machines/artemis/modules.nix index 40208c2..9f7579c 100644 --- a/machines/artemis/modules.nix +++ b/machines/artemis/modules.nix @@ -48,6 +48,7 @@ bluetooth.enable = true; wifi.enable = true; fingerprint.enable = true; + fans.enable = true; }; network = { diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index 53ff11b..7fd1ac7 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -6,5 +6,6 @@ ./wifi.nix ./fingerprint.nix ./keyd.nix + ./fans.nix ]; } diff --git a/modules/hardware/fans.nix b/modules/hardware/fans.nix new file mode 100644 index 0000000..3a3e7f1 --- /dev/null +++ b/modules/hardware/fans.nix @@ -0,0 +1,38 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.horseman.hardware.fans; +in { + options = { + horseman.hardware.fans = { + enable = mkEnableOption "Fan control for framework laptop"; + }; + }; + + config = mkIf cfg.enable { + hardware.fw-fanctrl = { + enable = true; + config = { + defaultStrategy = "school"; + strategies = { + "school" = { + movingAverageInterval = 10; + speedCurve = [ + { temp = 40; speed = 0; } + { temp = 50; speed = 30; } + { temp = 65; speed = 60; } + { temp = 75; speed = 100; } + ]; + }; + "full".speedCurve = [ + { temp = 0; speed = 100; } + { temp = 100; speed = 100; } + ]; + }; + }; + }; + }; +} diff --git a/modules/wm/hyprland/animations.nix b/modules/wm/hyprland/animations.nix index 48cb318..d206493 100644 --- a/modules/wm/hyprland/animations.nix +++ b/modules/wm/hyprland/animations.nix @@ -83,7 +83,7 @@ in { }; fadeOut = { - speed = 10; + speed = 2; curve = linear; }; };