1 2 3 4 5 6 7
#!/usr/bin/env bash set -x nix-env --delete-generations +1 home-manager expire-generations "-0 days" sudo nix-collect-garbage -d sudo nixos-rebuild boot