1
1
Fork 0
nixos/options/custom/services/fw-fanctrl.nix
Myned ab485dec35
nix: format with alejandra
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 20:50:53 -05:00

38 lines
912 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.services.fw-fanctrl;
in {
options.custom.services.fw-fanctrl.enable = mkOption {default = false;};
config = mkIf cfg.enable {
# https://github.com/TamtamHero/fw-fanctrl/tree/packaging/nix
programs.fw-fanctrl = {
enable = true;
# https://github.com/TamtamHero/fw-fanctrl/blob/packaging/nix/config.json
#?? fw-fanctrl --reload
config = {
defaultStrategy = "custom";
strategies.custom = {
fanSpeedUpdateFrequency = 3; # Seconds
movingAverageInterval = 30; # Seconds
speedCurve = let
curve = temp: speed: {inherit temp speed;};
in [
(curve 0 0)
(curve 40 20)
(curve 50 30)
(curve 60 40)
(curve 70 50)
#!! Max fan speed of 50%
];
};
};
};
};
}