From bdbfeff0c953ece46c4fd055f4df2f8413fe3041 Mon Sep 17 00:00:00 2001 From: tootbrute Date: Wed, 20 Nov 2024 20:19:04 +0800 Subject: [PATCH] Update NixOS config. --- git-pull.sh => pull-rebuild.sh | 10 ++++------ rebuild.sh | 5 +++++ git-update.sh => update.sh | 0 3 files changed, 9 insertions(+), 6 deletions(-) rename git-pull.sh => pull-rebuild.sh (76%) create mode 100755 rebuild.sh rename git-update.sh => update.sh (100%) diff --git a/git-pull.sh b/pull-rebuild.sh similarity index 76% rename from git-pull.sh rename to pull-rebuild.sh index f47b7b8..6764822 100755 --- a/git-pull.sh +++ b/pull-rebuild.sh @@ -1,11 +1,9 @@ -# add things to git -#git add . -#git commit -m "Update NixOS config." -#git push origin main - # pull new stuff down -#git pull ? +git pull origin main echo "rebuilding" $(hostname) "from git repo" +git pull origin main + +# build it sudo nixos-rebuild switch --flake '.#$(hostname)' # update nixos diff --git a/rebuild.sh b/rebuild.sh new file mode 100755 index 0000000..3e3ddf1 --- /dev/null +++ b/rebuild.sh @@ -0,0 +1,5 @@ +echo "rebuilding" $(hostname) "from git repo" +git pull origin main + +# build it +sudo nixos-rebuild switch --flake '.#$(hostname)' diff --git a/git-update.sh b/update.sh similarity index 100% rename from git-update.sh rename to update.sh