xin/bin/repair

9 lines
235 B
Plaintext
Raw Permalink Normal View History

2024-06-28 09:37:50 -06:00
#!/usr/bin/env bash
2024-07-19 09:14:20 -06:00
sudo date
while nix flake check --no-build |& grep "is not valid" >/tmp/invalid; do
path=$(cat /tmp/invalid | awk -F\' '{print $2}')
echo "Repairing $path"
sudo nix-store --repair-path $path >/dev/null
done
2024-07-19 09:14:20 -06:00
date