From 99017afeee0cbc75bd82a37dcabf7e2a25712415 Mon Sep 17 00:00:00 2001 From: Adam Rabjerg Date: Tue, 18 Oct 2022 11:28:19 +0200 Subject: [PATCH] Added rebuild.sh --- rebuild.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 rebuild.sh diff --git a/rebuild.sh b/rebuild.sh new file mode 100755 index 0000000..1aa2b6a --- /dev/null +++ b/rebuild.sh @@ -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