This is not actively maintained. See nixops-hetznercloud for an alternative.
NixOps plugin for Hetzner Cloud integraiton.
See the main NixOps repo instructions for how to build NixOps with plugins. The easiest way to get authentication working is to get the hcloud cli and configure a context, but there are other ways to set credentials (see deployment.hcloud.token and deployment.hcloud.context options).
See tests/functional/single_machine_hcloud_base.nix
for usage examples.
The hcloud backend requires that you have a preconfigured NixOps snapshot. Hetzner provides a NixOs
ISO but there's no way to install from it automatically, so you should boot from this ISO and
follow the steps detailed in bootstrap/nixos-install-hetzner-cloud.sh
. Then create a snapshot
from the bootstraped server with a label named nixops
, no value needed.
Implemented:
- Server lifecycle management. Most optional machine actions are not implemented, such as reboot and rescue.
- Volume creation, attachment and mounting.
- SSH keys.
PRs implementing missing resources and functionality are welcome.
- hcloud backend requires a preconfigured NixOs snapshot.
$ nix-shell
$ poetry shell
The project uses pylint, mypy, isort and black as linters, these are all included as dev dependencies in pyproject.toml. There are no automated lints and the codebase is riddled with warnings, I'm working on getting the code up to standards.