Fediversity/deployment/run/tf-proxmox/tf-env.nix
Kiara Grouwstra 03e564f3d8
factor out TF setup
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-23 22:42:38 +02:00

33 lines
715 B
Nix

{
lib,
pkgs,
sources ? import ../../../npins,
}:
pkgs.stdenv.mkDerivation {
name = "tf-repo";
src =
with lib.fileset;
toSource {
root = ../../../.;
# don't copy ignored files
fileset = intersection (gitTracked ../../../.) ../../../.;
};
buildInputs = [
(pkgs.callPackage ./tf.nix { inherit sources; })
(pkgs.callPackage ../tf-setup.nix { inherit sources; })
];
buildPhase = ''
runHook preBuild
for category in deployment/run/tf-single-host deployment/run/tf-proxmox; do
pushd "$category"
source setup
popd
done
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
}