Spin down the HDDs when not in use

This commit is contained in:
coolneng 2021-05-24 21:44:00 +02:00
parent 000f56d295
commit 5911e6f678
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 11 additions and 0 deletions

View File

@ -61,4 +61,15 @@ in {
requires = [ "sata-hat.service" ]; requires = [ "sata-hat.service" ];
after = [ "vault.mount" ]; after = [ "vault.mount" ];
}; };
# Idle HDDs when not used
systemd.services.hd-idle = {
description = "Idle HDDs when not in use";
wantedBy = [ "default.target" ];
path = with pkgs; [ hd-idle ];
script = "${pkgs.hd-idle}/bin/hd-idle";
serviceConfig.Type = "simple";
requires = [ "sata-hat.service" ];
after = [ "vault.mount" ];
};
} }