12 lines
306 B
Bash
Executable File
12 lines
306 B
Bash
Executable File
#!/usr/bin/env bash
|
|
cd ~/nixos-config
|
|
|
|
sudo nixos-rebuild switch --flake . &>nixos-switch.log || (cat nixos-switch.log | grep --color error && exit 1)
|
|
|
|
current=$(nixos-rebuild list-generations | grep current)
|
|
|
|
git commit -am "$current"
|
|
|
|
notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
|
|