diff --git a/deployment/data-model.nix b/deployment/data-model.nix index ac4ee471..fba36399 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -265,7 +265,11 @@ let deployment-type = "tf-host"; }; }; - tf-env = pkgs.callPackage ./run/tf-single-host/tf-env.nix { inherit httpBackend; }; + tf-env = pkgs.callPackage ./run/tf-env.nix { + inherit httpBackend; + tfPackage = pkgs.callPackage ./run/tf-single-host/tf.nix { }; + tfDirs = [ "deployment/run/tf-single-host" ]; + }; in pkgs.writers.writeBashBin "deploy-tf.sh" (withPackages [ diff --git a/deployment/run/tf-single-host/tf-env.nix b/deployment/run/tf-env.nix similarity index 52% rename from deployment/run/tf-single-host/tf-env.nix rename to deployment/run/tf-env.nix index c00d17f5..3bda2b87 100644 --- a/deployment/run/tf-single-host/tf-env.nix +++ b/deployment/run/tf-env.nix @@ -2,26 +2,30 @@ lib, pkgs, httpBackend, - sources ? import ../../../npins, + tfPackage, + tfDirs, + sources ? import ../../npins, }: pkgs.stdenv.mkDerivation { name = "tf-repo"; src = with lib.fileset; toSource { - root = ../../../.; + root = ../../.; # don't copy ignored files - fileset = gitTracked ../../../.; + fileset = gitTracked ../../.; }; buildInputs = [ - (pkgs.callPackage ./tf.nix { inherit sources; }) - (pkgs.callPackage ../tf-setup.nix { inherit sources httpBackend; }) + tfPackage + (pkgs.callPackage ./tf-setup.nix { inherit sources httpBackend; }) ]; buildPhase = '' runHook preBuild - pushd deployment/run/tf-single-host - source setup - popd + for category in ${builtins.toString tfDirs}; do + pushd "$category" + source setup + popd + done runHook postBuild ''; installPhase = ''