diff --git a/modules/storage.nix b/modules/storage.nix index 2e20d19..4a1f649 100644 --- a/modules/storage.nix +++ b/modules/storage.nix @@ -1,10 +1,10 @@ -{ config, ... }: +{ config, lib, pkgs, ... }: { systemd.services.zfs-mount.enable = false; networking.hostId = "07019099"; boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.devNodes = "/dev/disk/by-id/ata-WDC_WD30EZRZ-00Z5HB0_WD-WCC4N7LL2J1S-part1"; #oder mit -part1 am ende + boot.zfs.devNodes = "/dev/disk/by-id/ata-WDC_WD30EZRZ-00Z5HB0_WD-WCC4N7LL2J1S-part1"; fileSystems."/bfds-nix" = { device = "bfds-nix"; @@ -40,4 +40,19 @@ { device = "bfds-nix/ebooks"; fsType = "zfs"; }; + + systemd.services.hdparm = { + description = "Set hdparm energy settings at boot"; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + /run/current-system/sw/bin/hdparm -B 72 /dev/sda + /run/current-system/sw/bin/hdparm -B 72 /dev/sdb + /run/current-system/sw/bin/hdparm -B 72 /dev/sdc + ''; + User = "root"; + }; + }; }