| if [[ $(git diff --stat HEAD) != '' ]]; then |
| read -e -p "What did you change?: " changes |
| /usr/bin/env git commit -am "$changes" |
| nix build .#homeConfigurations.${USER}.activationPackage $1 || exit 1 |
| echo "Removing old profiles..." |
| | { grep 'home-manager-path$' || test $? = 1; } \ |
| | awk -F ' ' '{ print $4 }' \ |
| | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG |
| # ^ Remove old profiles; from https://github.com/nix-community/home-manager/blob/8d38ca886880265d523a66fe3da4d42e92ab0748/modules/home-environment.nix#L582 |