nixops-hetzner
nixops-hetzner copied to clipboard
Hetzner: can't build without actual provisioning
Hetzner machines can't be evaluated/built without actual deploy, because boot.loader.grub.devices and fileSystems get known only after the machines are created.
Failed assertions:
- The ‘fileSystems’ option does not specify your root file system.
- You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.
This is inconvenient if you want to conduct simple sanity checks before merging changes.
E. g. by creating new NixOps state and invoking nixops deploy ... --build-only.
Even if the machine exists, NixOps' state can be unavailable for security reasons.
As a workaround: when making test build, export environment variable and set the default values if the variable exists.
Unconditional default values seem not working: they override actual values, or get overridden, or conflict :)