diff options
author | EuAndreh <eu@euandre.org> | 2023-02-22 21:34:24 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-02-22 21:34:24 -0300 |
commit | af74b3816c4395ce6391199f997b88fa93c2baa7 (patch) | |
tree | 738ed8aa1731a78b21dccbbb5be4ec40c24be726 | |
parent | bin/gc: Do Nix GC too (diff) | |
download | dotfiles-af74b3816c4395ce6391199f997b88fa93c2baa7.tar.gz dotfiles-af74b3816c4395ce6391199f997b88fa93c2baa7.tar.xz |
bin/gc: GC Guix for root user
-rwxr-xr-x | bin/gc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 } |