aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-03-03 20:36:00 +0100
committerKarel Kočí <cynerd@email.cz>2023-03-03 20:36:00 +0100
commitbe12face6349f883eb684906df624956c462342a (patch)
tree10adaf86e58b0f04918dfb581e6239b543e95b68 /tools
parentfe9594d471fd1ec9531d1adbbee4a407b76252b0 (diff)
downloadnixos-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.sh3
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")"