diff options
Diffstat (limited to 'update-host.sh')
-rwxr-xr-x | update-host.sh | 9 |
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 + |