bin/repair: add script to fix bad paths

This commit is contained in:
Aaron Bieber 2024-03-28 11:40:21 -06:00
parent 22190b25e3
commit 6150b45593
No known key found for this signature in database

8
bin/repair Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
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