diff --git a/scripts/test-build b/scripts/test-build index a050d35..d816cba 100755 --- a/scripts/test-build +++ b/scripts/test-build @@ -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 diff --git a/shell.nix b/shell.nix index 5c0e663..2d55736 100644 --- a/shell.nix +++ b/shell.nix @@ -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) ''; }