nixos/edithome

14 lines
426 B
Plaintext
Raw Permalink Normal View History

2024-11-12 00:46:48 +01:00
nvim $HOME/.config/home-manager/home.nix
home-manager switch &>home-switch.log || (
2024-11-12 00:46:25 +01:00
cat home-switch.log | grep --color error && false)
gen=$(home-manager generations | head -n1 | sed 's/->.*//')
2024-11-12 11:42:47 +01:00
sudo cp -r $HOME/.config/home-manager .
2024-11-12 00:46:25 +01:00
git add .
git commit -m "$gen"
if grep -q "error" home-switch.log; then
echo "There was an error in your Home Manager Config, please fix it before you push to git"
else
git push
fi