forked from Fediversity/Fediversity
intended to swap out nixos-anywhere for terraform-nixos, over: - don't need nixos-anywhere to install nixos; we preload nixos to VMs - [awkward non-flake usage](https://nix-community.github.io/nixos-anywhere/howtos/use-without-flakes.html#3-set-nixos-version-to-use) - seemed not to pick up on config changes, as observed by test VMs losing their panel keys after TF sync however, it seems that terraform-nixos has its own flaws: - its output using a random id, i.e. forcing to push even on no changes - so far did not get ssh authentication to work |
||
---|---|---|
.. | ||
.terraform | ||
vm | ||
.auto.tfvars.json | ||
.envrc | ||
.gitignore | ||
.terraform.lock.hcl | ||
default.nix | ||
garage.nix | ||
main.tf | ||
mastodon.nix | ||
module.auto.tfvars.json | ||
pass-ssh-key.sh | ||
peertube.nix | ||
pixelfed.nix | ||
README.md | ||
resource.nix | ||
shared.nix | ||
shell.nix | ||
terraform.tfstate | ||
terraform.tfstate.backup | ||
tf-env.nix | ||
tf.nix |
service deployment
usage
updating TF modules
$ npins update terraform-nixos
$ cd launch/
$ echo "{\"terraform-nixos\": $(nix-instantiate --eval --json -E '(import ../npins).terraform-nixos.outPath')}" > .auto.tfvars.json
local development
$ nix-shell
$ rm -rf .terraform/
$ tofu init