Make the test-build script easier to work with

This commit is contained in:
Andreas Zweili 2024-04-08 20:11:45 +02:00
parent d227fc5a37
commit 81077feb6f
2 changed files with 3 additions and 4 deletions

View File

@ -1,9 +1,7 @@
#!/usr/bin/env bash
set -e
cd /home/andreas/.nixos
hosts=($(echo $(nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)') | xargs))
hosts=($(echo $(nix eval "$DEVENV_ROOT"#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)') | xargs))
skip=(
"desktop-vm"
"gwyn"
@ -18,7 +16,7 @@ for host in "${hosts[@]}"; do
continue
fi
echo $host
nixos-rebuild dry-build --flake .#${host}
nixos-rebuild dry-build --flake $DEVENV_ROOT#${host}
echo
echo
done

View File

@ -19,5 +19,6 @@ pkgs.mkShell {
PATH=${pkgs.writeShellScriptBin "nix" ''
${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@"
''}/bin:$PATH
export DEVENV_ROOT=$(pwd)
'';
}