diff --git a/configuration.nix b/configuration.nix index d6a24dd..a7fb730 100644 --- a/configuration.nix +++ b/configuration.nix @@ -182,9 +182,6 @@ smartmontools ]; - # i gotta fix that - excludeShellChecks = [ "SC2010" ]; - text = '' #!/bin/sh set -e @@ -193,8 +190,10 @@ exit 2 fi - DISKS=$(ls /dev/sd* | grep -v "[0-9]$") - for i in $DISKS; do + for i in /dev/disk/by-id/*; do + case "$i" in + *\\-part[0-9]*) continue ;; + esac echo -n "$i " smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6 done