After installing a fresh install of NixOS onto a 128GB SSD, I’ve been able to run my initial config by running sudo nixos-rebuild switch –upgrade . I have a lot of software, but after installation, it occupies roughly 71.85GBs of 128GBs.
However, when I run the same command, I’m unable to upgrade any of the software due to running out of space.
I’ve ran nix-env , and deleted all generations but one, and deleted all excess stuff, by the following command: sudo nix-env --delete-generations -p /nix/var/nix/profiles/system +1 && sudo nix-store --gc --print-roots && sudo nix-store --optimise && sudo nix-collect-garbage --delete-older-than 2d .
Any advise on how I can build and upgrade my packages in such a limited space/? Is there a flag I can use that would allow certain packages to be updated and have older generation of software deleted as the updates happen in real time?
Would I have to expand my root to another drive and partition?