From 631bf8c848d2ec95a7502c8b120829b58143d6bd Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 14 May 2023 19:25:28 -0400 Subject: [PATCH] Updater script --- sources/update-sources.sh | 3 ++- update.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 update.sh diff --git a/sources/update-sources.sh b/sources/update-sources.sh index 386f1c9..0f66b56 100755 --- a/sources/update-sources.sh +++ b/sources/update-sources.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -exou pipefail +set -eou pipefail DIRECTORY=$(realpath "$(dirname "$0")") @@ -26,3 +26,4 @@ jq --null-input \ --arg hash "$LAYMAN_HASH" \ '{"rev": $rev, "hash": $hash}' \ > $DIRECTORY/layman.json +echo "layman now at $LAYMAN_REV" diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..66bd3b1 --- /dev/null +++ b/update.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -eou pipefail + +DIRECTORY=$(realpath "$(dirname "$0")") + +# Update our sources first +$DIRECTORY/sources/update-sources.sh + +# Then update the flake +nix flake update + +# Make sure we still build our systems +nix build .#nixosConfigurations.oracles.config.system.build.toplevel +nix build .#nixosConfigurations.matrix.config.system.build.toplevel +nix build .#nixosConfigurations.tounge.config.system.build.toplevel +nix build .#nixosConfigurations.perception.config.system.build.toplevel +nix build .#nixosConfigurations.fusion.config.system.build.toplevel + +# Collect garbage +nix-collect-garbage