Fixed if statement. Added separate disk-spindown file.

This commit is contained in:
Raphael Numbus
2025-12-14 14:52:11 +01:00
parent f777e608b8
commit 622280b62f
4 changed files with 25 additions and 29 deletions
+17
View File
@@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }:
### --> Disk spindown
systemd.services.hd-idle = {
description = "External HD spin down daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
ExecStart =
let
idleTime = toString 1800;
hardDriveParameter = lib.strings.concatMapStringsSep " " (x: "-a ${x} -i ${idleTime}") hardDrives;
in
"${pkgs.hd-idle}/bin/hd-idle -i 0 ${hardDriveParameter}";
};
};
### Disk spindown <--