add further comments

This commit is contained in:
Kiara Grouwstra 2025-04-18 10:53:08 +02:00
parent cb69cb41b5
commit 2510b68a68
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
5 changed files with 21 additions and 4 deletions

View file

@ -1,7 +1,15 @@
# service deployment
deploys [NixOS](https://nixos.org/) templates using [OpenTofu](https://opentofu.org/).
## requirements
- [nix](https://nix.dev/)
## usage
### development
before using other commands, if not using direnv:
```sh
@ -13,3 +21,8 @@ then to initialize, or after updating pins or TF providers:
```sh
setup
```
## implementing
proper documentation TODO.
until then, a reference implementation may be found in [`panel/`](https://git.fediversity.eu/Fediversity/Fediversity/src/branch/main/panel).

View file

@ -91,8 +91,11 @@ resource "terraform_data" "nixos" {
configuration = {
# note interpolations here TF ones
imports = [
${path.root}/options.nix
# shared NixOS config
${path.root}/shared.nix
# FIXME: separate template options by service
${path.root}/options.nix
# for service `mastodon` import `mastodon.nix`
${path.root}/${each.key}.nix
# FIXME: get VM details from TF
${path.root}/../infra/test-machines/${each.value.hostname}
@ -100,7 +103,7 @@ resource "terraform_data" "nixos" {
# nix path for debugging
nix.nixPath = [ "${local.nix_path}" ];
} //
# info passed in thru json from TF
# template parameters passed in from TF thru json
builtins.fromJSON "${replace(jsonencode({
terraform = {
domain = var.domain

View file

@ -1,4 +1,4 @@
# TODO: could (part of) this be generated somehow?
# TODO: could (part of) this be generated somehow? c.f #275
{
lib,
...

View file

@ -1,4 +1,4 @@
# TODO: generate (part of) the variables?
# TODO: (partially) generate, say from nix modules, c.f. #275
variable "domain" {
type = string

View file

@ -1,3 +1,4 @@
# TODO upstream, see #248
{
lib,
buildPythonPackage,