aboutsummaryrefslogtreecommitdiff
path: root/nix/README.md
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2026-09-15 17:32:35 +0000
committerKumar Damani <me@kumardamani.net>2026-09-15 21:09:51 +0000
commitb636b1d775de012fd5af866464680e30b6a5f072 (patch)
treed0d0ba591a7d291f26f2e13276e0e18c33dc4835 /nix/README.md
parent977e3411a8d5836c7105d1cf0c5782413a3de078 (diff)
monitoring config
Diffstat (limited to 'nix/README.md')
-rw-r--r--nix/README.md23
1 files changed, 20 insertions, 3 deletions
diff --git a/nix/README.md b/nix/README.md
index ab3a339..95cd4ac 100644
--- a/nix/README.md
+++ b/nix/README.md
@@ -38,15 +38,27 @@ tofu apply tfplan
## Add Host
-Copy `per-host/<EXISTING_HOST>` to `per-host/<HOST_NAME>`.
+Scaffold a new host (host keys, `.sops.yaml`, `flake.nix`, `per-host/`, secrets, TF VM if absent, `~/.ssh/config`, Hosts section) and print the exact cmds to create the VM and deploy:
+```sh
+./add.sh <HOST_NAME> # interactive for cpu/mem/disk/vlan
+./add.sh <HOST_NAME> --cpu 1 --mem 1024 --disk 10G --vlan 30
+```
-Modify the `per-host/<HOST_NAME>/configuration.nix` accordingly.
+Defaults for cpu/mem/disk/vlan are taken from `monitoring-2`. If the VM already exists in TF it is left alone.
-Generate host-keys, and `age` key for the host.
+The manual equivalent, if needed:
```sh
./generate-keys.sh <HOST_NAME>
+
+cat ./host-keys/<HOST_NAME>/ssh_host_ed25519_key.pub | ssh-to-age
```
+Copy the `age` key to the `.sops.yaml` config.
+
+Copy `per-host/<EXISTING_HOST>` to `per-host/<HOST_NAME>`.
+
+Modify the `per-host/<HOST_NAME>/configuration.nix` accordingly.
+
## Secrets w/ `sops`
Edit the `.sops.yaml` to include the host's age key.
@@ -171,3 +183,8 @@ sudo garage bucket create <BUCKET_NAME>
sudo garage bucket website --allow <BUCKET_NAME>
sudo garage key create site-uploader
```
+
+### monitoring-2
+
+For monitoring.
+