Open zimbatm opened 1 year ago
a Hetzner machine doesn't provide the metadata
Just in case this isn't known already: dedicated hetzner machines do not, but for hetzner cloud machines there's http://169.254.169.254/hetzner/v1/metadata providing metadata.
+1
I emailed Numtide about this a while ago.
But I'd say this would be an idea for an new project?
Would make deploying a lot of machines hell'a easier.
Basically the idea would be:
Build an bare NixOS iso with CloudInit ➞ Boot an bare minimal NixOS iso with CloudInit ➞ Pass these values to Nix (nixos-anywhere or nixos-install) ➞ Reboot ➞ Profit?
Providing a template flake could be Amal beneficial?
Currently, maybe something like this could for at least me: https://gist.github.com/voidus/1230b200043b7f815e2513663d16353b
Though, I could make a flake to make this easier
Is your feature request related to a problem? Please describe.
When provisioning a new system, we might want to provide metadata to configure things like the machine's hostname, authorized SSH keys, .... But not all targets have a metadata service (eg: a Hetzner machine doesn't provide the metadata).
Describe the solution you'd like
Cloudinit can source some of its metadata from a specially crafted disk partition. nixos-remote could be used to prepare that disk partition.
See https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html
Describe alternatives you've considered
Additional context