From c1dde9b489fac334cdef58a51dd7b86b90e767e9 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 13 Apr 2023 10:55:36 -0300 Subject: 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. --- bin/gc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bin/gc') 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() { -- cgit v1.2.3