NixOS
Collecting garbage
To reclaim some storage, this command is useful:
sudo nix-collect-garbage -d
It deletes all previous generations from the Nix store.
Flakes
Using a flake without staging the flake.nix
git add --intent-to-add flake.nix git update-index --skip-worktree flake.nix