Added fancontrol
This commit is contained in:
1 parent
fa60e00405
commit
eba5869d86
2 files changed
+31
No files matched your search
@@ -2,5 +2,6 @@
|
||||
{
|
||||
imports = [
|
||||
./fan2go.nix
|
||||
./fancontrol.nix
|
||||
];
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user