From 85809b555de21708f125190e64a2090c6f471a66 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 9 May 2018 21:04:06 +0200 Subject: Spin down storage drive by default --- configuration.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 8fcab2e..93ad350 100644 --- a/configuration.nix +++ b/configuration.nix @@ -91,6 +91,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" ]; + }; + users.extraUsers.common = { isNormalUser = true; uid = 1000; @@ -102,7 +112,7 @@ systemPackages = let custom_vim = import ./pkgs/vim/vim.nix pkgs; in with pkgs; [ - ntfs3g htop fish git silver-searcher custom_vim + ntfs3g psmisc htop fish git silver-searcher custom_vim ]; shellAliases = { -- cgit v1.2.3