Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

NixOS Server Example with plops

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

Make sure your passwordstore is setup correctly.

Server creation

nix-shell --run "terranix > && terraform init && terraform apply"

Server provisioning

This will recompile git, because we overwrite openssh, to use the local ssh key.

cd plops
nix-shell --run "deploy-server1"

Server deletion

nix-shell --run "terraform destroy"


Passwords are managed by pass the password-store.

You need a hcloud token which is stored under development/ in your passwordstore. (Of course you can change that by adjusting the ./shell.nix).

You can’t perform that action at this time.