about summary refs log tree commit diff
path: root/ops/terraform/deploy-nixos/nix-eval.sh
AgeCommit message (Collapse)AuthorFilesLines
2024-03-26 r/7783 refactor(ops/terraform/deploy-nixos): argstr -> argstr_jsonFlorian Klink1-3/+3
At least terraform wants all parameters passed via JSON to be strings. It can't accept maps. This means, allowing to pass a `argstr` JSON dict isn't really possible. However, terraform is perfectly able to JSON-encode a map. So accept a `argstr_json` argument instead, which `jq` will JSON-decode before further processing it. I dropped `argstr` support again so the jq expression still fits on my screen, if anyone else (started) using this, I'm happy to review a CL adding this. We should probably move the jq expression to some multiline format then, though. Change-Id: I5ab7a1169ab7305d3ab02db31c27732d9d1ab4e8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11228 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-03-26 r/7782 feat(ops/terraform/deploy-nixos): add `build` parameterFlorian Klink1-1/+10
If this is set to true (and only then), also invoke `nix-build` on the previously-instantiated .drv to cause builds/substitutions on the local machine. There's no terraform example for this in here, but this is useful if you want to perform builds locally, for example to upload nix-built blobs elsewhere through terraform. Change-Id: Idcf7b8527aa9c27f6f9ca60ca607c29d82e1cce9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11215 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-24 r/7780 feat(ops/terraform/deploy-nixos): add outPath output parameterFlorian Klink1-1/+5
We already did all the instantiation, grabbing the calculated output path too is cheap. Change-Id: Id591865c65159409da739f706a9de29a9f50456a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11214 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-03-22 r/7760 docs(ops/terraform/deploy-nixos): document inputs and outputsFlorian Klink1-0/+34
This documents the input and output format, and also removes some references to Terraform and evaluating NixOS system configurations. It can be used to evaluate anything. Change-Id: I8492cc3e386f89b299469c78e586644ee82a708f Reviewed-on: https://cl.tvl.fyi/c/depot/+/11213 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI