aboutsummaryrefslogtreecommitdiff
path: root/bin/gc
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-13 10:55:36 -0300
committerEuAndreh <eu@euandre.org>2023-04-13 10:55:39 -0300
commitc1dde9b489fac334cdef58a51dd7b86b90e767e9 (patch)
tree8b350820d9915e6e33877118fe77810da1b70bbb /bin/gc
parentMakefile: Adapt path to share/aux in "check-shellcheck" target (diff)
downloaddotfiles-c1dde9b489fac334cdef58a51dd7b86b90e767e9.tar.gz
dotfiles-c1dde9b489fac334cdef58a51dd7b86b90e767e9.tar.xz
bin/gc: Run GC for user-level Guix first
When there is 0 bytes of disk left, GPG fails to run because it can't create a lockfile it requires. This way, we free space before needing GPG.
Diffstat (limited to 'bin/gc')
-rwxr-xr-xbin/gc7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/gc b/bin/gc
index f51e60a..5cbfd16 100755
--- a/bin/gc
+++ b/bin/gc
@@ -83,12 +83,13 @@ gc_guix() {
return
fi
+ guix home delete-generations
+ guix gc -d
+
if [ -e /var/guix/profiles/system ]; then
pass show "$(hostname)"/andreh | head -n1 | sudo -iS guix system delete-generations
+ pass show "$(hostname)"/andreh | head -n1 | sudo -iS guix gc -d
fi
- pass show "$(hostname)"/andreh | head -n1 | sudo -iS guix gc -d
- guix home delete-generations
- guix gc -d
}
gc_nix() {