about summary refs log tree commit diff
path: root/update-host.sh
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-13 15:04:06 +0200
committerEmile <git@emile.space>2024-09-13 15:04:06 +0200
commit35d6c2c70824cf77ef2216889cc9730b622f5ac1 (patch)
tree2435a97f87409deb57c279fb41534e0d10c901ca /update-host.sh
parent902c97cf9aa16c5bb4a45b28f182e4d6033156e7 (diff)
big push
Diffstat (limited to 'update-host.sh')
-rwxr-xr-xupdate-host.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/update-host.sh b/update-host.sh
new file mode 100755
index 0000000..a70b053
--- /dev/null
+++ b/update-host.sh
@@ -0,0 +1,9 @@
+HOSTNAME="corrino"
+
+HYDRA=https://hydra.emile.space/job/hefe/builds/nixosConfigurations.${HOSTNAME}/latest-finished
+STORE_PATH="$(curl -sL -H "Accept: application/json" "${HYDRA}" | jq -r ".buildoutputs.out.path")"
+
+nix copy --from "https://nix-cache.emile.space" "${STORE_PATH}"
+nix-env -p "/nix/var/nix/profiles/system" --set "${STORE_PATH}"
+/nix/var/nix/profiles/system/bin/switch-to-configuration boot
+