Spin down the HDDs when not in use
This commit is contained in:
parent
76c49857db
commit
87f35f3bb3
|
@ -97,6 +97,10 @@
|
||||||
services.journald.extraConfig = "SystemMaxFiles=7";
|
services.journald.extraConfig = "SystemMaxFiles=7";
|
||||||
|
|
||||||
# Import other configuration modules
|
# Import other configuration modules
|
||||||
imports = [ ./modules/hardware-configuration.nix ./modules/networking.nix ];
|
imports = [
|
||||||
|
./modules/hardware-configuration.nix
|
||||||
|
./modules/networking.nix
|
||||||
|
./modules/periodic.nix
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# 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";
|
||||||
|
after = [ "shield-unit.mount" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue