From f71cff27ed8c94cf36a8c203a75ac9af00be0514 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 15 Apr 2024 21:39:51 +0200 Subject: [PATCH] Add a script to build and push all machines --- scripts/build-all-machines | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/build-all-machines diff --git a/scripts/build-all-machines b/scripts/build-all-machines new file mode 100755 index 0000000..091fb68 --- /dev/null +++ b/scripts/build-all-machines @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -e + +hosts=($(echo $(nix eval "$DEVENV_ROOT"#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)') | xargs)) +skip=( + "desktop-vm" + "gwyn" + "loki-test" + "mobile" + "test-raspi" + "staubfinger" +) + +for host in "${hosts[@]}"; do + if [[ " ${skip[*]} " =~ " ${host} " ]]; then + continue + fi + echo $host + nixos-rebuild build --flake "$DEVENV_ROOT#${host}" + attic push prod "$DEVENV_ROOT"/result + rm -f "$DEVENV_ROOT"/result + echo + echo +done