summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-06-20 13:37:45 +0200
committerAdrian Kummerlaender2018-06-20 13:37:45 +0200
commit05517638bd27687691bfa22ee410e49bf0f2eece (patch)
tree3cf39ded861f690d3a03b4566ac5912abae843f1
parent57ded1cfdfa3a3d9ac511ca8cc936983428267c5 (diff)
downloadnixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar.gz
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar.bz2
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar.lz
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar.xz
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.tar.zst
nixos_system-05517638bd27687691bfa22ee410e49bf0f2eece.zip
Readd storage drive spin-down service for obelix
-rw-r--r--host/obelix.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/obelix.nix b/host/obelix.nix
index c20dbab..f260768 100644
--- a/host/obelix.nix
+++ b/host/obelix.nix
@@ -1,3 +1,5 @@
+{ pkgs, ... }:
+
{
imports = [ ./hardware/obelix.nix ];
@@ -18,6 +20,16 @@
} ];
};
+ systemd.services.spin-down-storage = {
+ enable = true;
+ description = "Spin down storage drive by default";
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.hdparm}/bin/hdparm -q -S 120 -y /dev/disk/by-label/storage";
+ };
+ wantedBy = [ "multi-user.target" ];
+ };
+
networking = {
hostName = "obelix";
firewall.enable = false;