Running out of disk space while installing vault in a VM

I’m trying to install HashiCorp vault (flox install vault) in a VM (lima on macOS) but it’s running out of disk space while building it.

       last 10 log lines:
       > go: downloading github.com/x448/float16 v0.8.4
       > go: downloading github.com/std-uritemplate/std-uritemplate/go v0.0.57
       > go: downloading github.com/xdg-go/pbkdf2 v1.0.0
       > go: downloading cel.dev/expr v0.16.1
       > go: downloading github.com/cjlapao/common-go v0.0.39
       > go: downloading github.com/microsoft/kiota-http-go v1.4.4
       > go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1
       > go: downloading github.com/emicklei/go-restful/v3 v3.11.0
       > # github.com/microsoftgraph/msgraph-sdk-go/models
       > compile: writing output: write $WORK/b1718/_pkg_.a: no space left on device

The VM has a 100G thin provisioned disk with only 11G in use and my macbook’s disk has 90G of space remaining so I think it should be able to expand it. I’ve also been able to write a 20G file of random data in the VM so I think there’s no problem with the backing storage from the macbook. I assume most of the space flox will use is under /nix which is on the 100G disk. Is there any way to get more information about where the build is running out of space?

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda3        99G   11G   86G  12% /
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           7.8G  100K  7.8G   1% /dev/shm
efivarfs         56K  1.9K   55K   4% /sys/firmware/efi/efivars
tmpfs           3.2G  1.4M  3.2G   1% /run
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-udev-load-credentials.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-network-generator.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-sysctl.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup-dev-early.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup-dev.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-vconsole-setup.service
mount0          461G  402G   59G  88% /Users/will.gorman
tmpfs           7.8G   44K  7.8G   1% /tmp
/dev/vda3        99G   11G   86G  12% /home
/dev/vda3        99G   11G   86G  12% /var
mount1          461G  402G   59G  88% /tmp/lima
/dev/vda2       966M  246M  655M  28% /boot
/dev/vda1       100M   13M   88M  13% /boot/efi
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-tmpfiles-setup.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-resolved.service
tmpfs           1.6G  136K  1.6G   1% /run/user/501
/dev/vdb        247M  247M     0 100% /mnt/lima-cidata
tmpfs           1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/serial-getty@hvc0.service

If you run flox -vv install vault, the last command in the debug output should be something like

/nix/store/hhandlwac85h67gpkb010p8nzix10ahk-nix-2.24.9/bin/nix --option extra-experimental-features 'nix-command flakes' --option pure-eval false --print-build-logs --option extra-plugin-files /nix/store/pcsgippsbxg19b4i4hvwagcbp2fk5fmj-flox-nix-plugins-1.3.12/lib/nix-plugins build --no-write-lock-file --no-update-lock-file --option pure-eval true --no-link 'flox-nixpkgs:v0/flox/799ba5bffed04ced7067a91798353d360788b30d#legacyPackages.aarch64-darwin.vault^*'

If you copy and paste that command and run it directly, I think it should print build logs

In this case I ended up realizing that what I really wanted was the vault-bin package since that’s quicker to install and I’m fine with using prebuilt binaries. I’ll keep that option in mind if I run into something else like this again, thanks!