nixos-config/terranix/workadventure-jitsi-setup/README.md
2021-01-30 17:23:50 +01:00

55 lines
1.5 KiB
Markdown

# NixOS Server Example with plops
This setup shows:
* how to use a terranix module
* how to use 3rd party provision software after terraform.
* how to run terranix and terraform
Setup containing opinionated modules to deploy
[NixOS servers](https://nixos.org/)
on
[hcloud](https://www.hetzner.com/cloud)
using
[nixos-infect](https://github.com/elitak/nixos-infect)
with my
[plops](https://github.com/mrVanDalo/plops)
provisioning tool for NixOS,
which is an overlay on
[krops](https://cgit.krebsco.de/krops/about/).
After server creation,
the initial provisioning uploads the
nixos-infect
script and applys it.
After server creation and initialization
terranix/terraform generates
files used for the "real" provisioning
done by plops.
Of course instead of plops you can use every provsioning tool you like
here (e.g. NixOps, Ansible, ... )
# How to Run
## What you need
* a setup [passwordstore](https://www.passwordstore.org/).
* a [hcloud token](https://docs.hetzner.cloud/#overview-getting-started)
stored under `development/hetzner.com/api-token`
## Steps
* `terraform-prepare`: to create ssh keys.
* `terraform-build`: to run terranix and terraform do create server.
* `terraform-destroy`: to delete server (don't forget that step, or else it gets costly)
* `terraform-cleanup`: to delete ssh keys and terraform data.
## DNS
define domains with your nameserver and update `jitsi.nix` and `workadventure.nix`.
* `meet.${domain}` to given ip4 address
* `party.${domain}` to given ip4 address
* `*.party.${domain}` to given ip4 address