NixOS adoption has a few stumbling blocks. Besides the obvious I would like to gather some communal wizdom on the following related topics:
Cloud Images
It seems like NixOS is still considered an odd duckling by cloud providers.
At least there seems limited support to provide a base image.
Now my current approach is:
- create a Debian system
- use cloudinit to nixos-infect the system (unfortunately no flake support)
- then manually clone my flake and switch
Now I guess this could then be used as a basis to clone machines?
I am not sure about the implications though (mac addresses, host keys etc).
Is there a better way? There needs to be a better way.
I want to be be able to create two cloud machines on Hetzner and bring up a system with my flake applied.
Has anyone gotten such a setup working?
Managing many machines/servers
Is there anyone here running more than 10 servers (50+?) on NixOS?
How does nix scale from a management point of view?
A single file that holds all nixosConfigurations?
How do you apply changes? deploy-rs and friends?
And I am also a little worried about resources to evaluate my flake.
My little flake for less than a handful of machines can already take quite long to evaluate (on a powerful machine). What will happen with 100+ nixosConfigurations? (I didn’t try yet)
And every server will download and build the derivation?
I guess some local caching might help? Like
Binary Cache - NixOS Wiki
cachix
atticd
And then it also feels like there is a certain overlap with terraform/opentofu.
I found:
but I am curious how this works in reality.
The integration and the flow is still a bit unclear.
Are hcl files derived from the nix config?
I also saw NixOps. But it seems that’s on its way out - with a pending re-write.
If you have some feedback or repos to share, that would be great.
Thanks!