Skyler Turner | 138b6f7 | 2022-03-04 22:35:15 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Skyler Grey | 4bbb513 | 2022-05-31 23:14:33 +0100 | [diff] [blame] | 3 | cd /home/minion/Nix |
Skyler Turner | 138b6f7 | 2022-03-04 22:35:15 +0000 | [diff] [blame] | 4 | |
Skyler Turner | 27c8f0c | 2022-03-08 13:07:15 +0000 | [diff] [blame] | 5 | git add . |
| 6 | |
Skyler Turner | f0d8954 | 2022-03-06 23:24:02 +0000 | [diff] [blame] | 7 | if [[ $(git diff --stat HEAD) != '' ]]; then |
Skyler Turner | 138b6f7 | 2022-03-04 22:35:15 +0000 | [diff] [blame] | 8 | read -ep "What did you change?: " changes |
Skyler Turner | d3b7068 | 2022-03-06 23:19:45 +0000 | [diff] [blame] | 9 | /usr/bin/env git commit -am "$changes" |
Skyler Turner | 138b6f7 | 2022-03-04 22:35:15 +0000 | [diff] [blame] | 10 | fi |
| 11 | |
Skyler Grey | 3dd0823 | 2022-05-24 09:58:02 +0100 | [diff] [blame] | 12 | nix build .#homeConfigurations.${USER}.activationPackage $1 || exit 1 |
Skyler Grey | 16fcedd | 2022-05-22 09:13:02 +0100 | [diff] [blame] | 13 | |
| 14 | nix profile list \ |
| 15 | | { grep 'home-manager-path$' || test $? = 1; } \ |
| 16 | | awk -F ' ' '{ print $4 }' \ |
| 17 | | cut -d ' ' -f 4 \ |
| 18 | | xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG |
| 19 | # ^ Remove old profiles; from https://github.com/nix-community/home-manager/blob/8d38ca886880265d523a66fe3da4d42e92ab0748/modules/home-environment.nix#L582 |
| 20 | |
| 21 | result/activate |
| 22 | unlink result |