add fan support for artemis
This commit is contained in:
parent
84bfe28cb6
commit
f88c89feab
4 changed files with 41 additions and 1 deletions
|
|
@ -48,6 +48,7 @@
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
wifi.enable = true;
|
wifi.enable = true;
|
||||||
fingerprint.enable = true;
|
fingerprint.enable = true;
|
||||||
|
fans.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
./wifi.nix
|
./wifi.nix
|
||||||
./fingerprint.nix
|
./fingerprint.nix
|
||||||
./keyd.nix
|
./keyd.nix
|
||||||
|
./fans.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
modules/hardware/fans.nix
Normal file
38
modules/hardware/fans.nix
Normal file
|
|
@ -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; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -83,7 +83,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
fadeOut = {
|
fadeOut = {
|
||||||
speed = 10;
|
speed = 2;
|
||||||
curve = linear;
|
curve = linear;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue