nixos/edithome
2024-11-12 10:42:47 +00:00

14 lines
426 B
Plaintext
Executable File

nvim $HOME/.config/home-manager/home.nix
home-manager switch &>home-switch.log || (
cat home-switch.log | grep --color error && false)
gen=$(home-manager generations | head -n1 | sed 's/->.*//')
sudo cp -r $HOME/.config/home-manager .
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