nixos-config/terranix/space-left
2021-09-05 10:38:00 +02:00
..
plops add space-left server 2021-08-30 20:37:28 +02:00
.gitignore add space-left setup 2021-02-14 20:24:19 +01:00
config.nix add space-left server 2021-08-30 20:37:28 +02:00
README.md add space-left setup 2021-02-14 20:24:19 +01:00
shell.nix add space-left server 2021-08-30 20:37:28 +02:00
terraform.tfstate removed terraform instance 2021-09-05 10:38:00 +02:00

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 on hcloud using nixos-infect with my plops provisioning tool for NixOS, which is an overlay on krops.

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

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