diff options
author | Karel Kočí <cynerd@email.cz> | 2023-03-03 20:36:00 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-03-03 20:36:00 +0100 |
commit | be12face6349f883eb684906df624956c462342a (patch) | |
tree | 10adaf86e58b0f04918dfb581e6239b543e95b68 /tools | |
parent | fe9594d471fd1ec9531d1adbbee4a407b76252b0 (diff) | |
download | nixos-personal-be12face6349f883eb684906df624956c462342a.tar.gz nixos-personal-be12face6349f883eb684906df624956c462342a.tar.bz2 nixos-personal-be12face6349f883eb684906df624956c462342a.zip |
errol: add zigbee2mqtt
Diffstat (limited to 'tools')
-rw-r--r-- | tools/common.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/common.sh b/tools/common.sh index a6b41fc..3f99479 100644 --- a/tools/common.sh +++ b/tools/common.sh @@ -125,7 +125,8 @@ copy() { store="$(readlink -f "$(result "$device")")" local freespace required; - freespace="$(_ssh "$device" df -B 1 /nix | awk 'NR == 2 { print $4 }')" + freespace_raw="$(_ssh "$device" df -B 1 --output=avail /nix)" + freespace="$(echo "$freespace_raw" | tail -1)" required="$(nix path-info -S "$store" | awk '{ print $2 }')" info "Free space on device: $(numfmt --to=iec "$freespace")" info "Required space: $(numfmt --to=iec "$required")" |