Added rebuild.sh
This commit is contained in:
12
rebuild.sh
Executable file
12
rebuild.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git commit
|
||||||
|
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Git commit not successful, will not rebuild before commit is complete."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Copying configurations to etc and rebuilding."
|
||||||
|
sudo cp /home/adam/nixos-configuration/*.nix /etc/nixos/.
|
||||||
|
sudo nixos-rebuild switch
|
||||||
Reference in New Issue
Block a user