aboutsummaryrefslogtreecommitdiff
path: root/bin/gc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gc')
-rwxr-xr-xbin/gc8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/gc b/bin/gc
index cd341ea..32103c5 100755
--- a/bin/gc
+++ b/bin/gc
@@ -79,10 +79,14 @@ disk() {
gc_guix() {
+ if [ ! -e /gnu/ ]; then
+ return
+ fi
+
if [ -e /var/guix/profiles/system ]; then
- pass show "$(hostname)"/andreh | head -n1 |
- sudo -iS sh -c 'guix system delete-generations && guix gc -d'
+ pass show "$(hostname)"/andreh | head -n1 | sudo -iS guix system delete-generations
fi
+ pass show "$(hostname)"/andreh | head -n1 | sudo -iS guix gc -d
guix home delete-generations
guix gc -d
}