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

View File

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