From 05517638bd27687691bfa22ee410e49bf0f2eece Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 20 Jun 2018 13:37:45 +0200 Subject: Readd storage drive spin-down service for obelix --- host/obelix.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; -- cgit v1.2.3