supabase-postgres.git / summary / log / commit / refs
commit 2d90dc07c31d7fbd14531e8fcdfbc040bc03e1e3
Author: Manuel Mendez <708570+mmlb@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Date: Mon Aug 24 16:39:11 2026 +0000
images: clean up nix at end of process (#2393)
nix-collect-garbage probably doesn't do anything but also doesn't hurt,
nix-store --optimise is giving us ~342M back!
ebssurrogate/scripts/nix-provision.sh | 6 ++++++
ebssurrogate/scripts/qemu-bootstrap-nix.sh | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/ebssurrogate/scripts/nix-provision.sh b/ebssurrogate/scripts/nix-provision.sh
index 3b576dc1..8e33ec63 100755
--- a/ebssurrogate/scripts/nix-provision.sh
+++ b/ebssurrogate/scripts/nix-provision.sh
@@ -72,6 +72,11 @@ function cleanup_packages {
# sudo add-apt-repository --yes --remove ppa:ansible/ansible
}
+function cleanup_nix {
+ nix-collect-garbage -d
+ nix-store --optimise -v
+}
+
function report_disk_usage {
read -r dub _ < <(du -sx -B1 /)
read -r duh _ < <(du -sx -h /)
@@ -82,4 +87,5 @@ install_packages
install_nix
execute_stage2_playbook
cleanup_packages
+cleanup_nix
report_disk_usage
diff --git a/ebssurrogate/scripts/qemu-bootstrap-nix.sh b/ebssurrogate/scripts/qemu-bootstrap-nix.sh
index 68619f3a..bf1005e0 100755
--- a/ebssurrogate/scripts/qemu-bootstrap-nix.sh
+++ b/ebssurrogate/scripts/qemu-bootstrap-nix.sh
@@ -186,6 +186,11 @@ function clean_system {
fi
}
+function clean_nix {
+ nix-collect-garbage -d
+ nix-store --optimise -v
+}
+
#################
# stage1 things #
#################
@@ -206,3 +211,4 @@ install_nix
execute_stage2_playbook
clean_legacy_things
clean_system
+clean_nix