Added fancontrol

This commit is contained in:
ari committed 2024-07-31 14:38:01 -04:00
1 parent fa60e00405
commit eba5869d86
2 files changed
+31

No files matched your search

+1
View File
@@ -2,5 +2,6 @@
{
imports = [
./fan2go.nix
./fancontrol.nix
];
}
+30
View File
@@ -0,0 +1,30 @@
{ lib
, config
, pkgs
, ...
}:
let
cfg = config.homelab.hardware.fancontrol;
in
{
options.homelab.hardware.fancontrol = with lib; {
enable = mkEnableOption "fancontrol";
};
config = lib.mkIf cfg.enable {
systemd.services.fancontrol = {
enable = true;
description = "Fan control";
wantedBy = [ "multi-user.target" "graphical.target" "rescue.target" ];
unitConfig = {
Type = "simple";
};
serviceConfig = {
ExecStart = "${pkgs.lm_sensors}/bin/fancontrol";
Restart = "always";
};
};
};
}