I am building a NixOS VM template with cloud-init (using systemd-networkd), since I push IP to the VM with cloud-init, when I use a gateway that requires GatewayOnLink = true, I have no way to set it up automatically.
If I use routeConfig, then the 10-cloud-init-eth0.network won't be generated by cloud-init (seems the pre-network just failed directly).
If I use networkd-dispatcher, then the sytemd-networkd will be hanging on the "Configuring" status, unless I write the route manually (In this case, I must disable networkd-dispatcher or the switch will failed).
Want to know if there's any way to solve that, or can any maintainer consider providing an option to enable the GatewayOnlink within the configuration.nix.
Expected behavior
Add an option so that I can enable GatewayOnLink without affecting the normal usage with cloud-init.
Describe the bug
I am building a NixOS VM template with cloud-init (using
systemd-networkd
), since I push IP to the VM with cloud-init, when I use a gateway that requires GatewayOnLink = true, I have no way to set it up automatically.If I use
routeConfig
, then the10-cloud-init-eth0.network
won't be generated by cloud-init (seems the pre-network just failed directly). If I usenetworkd-dispatcher
, then thesytemd-networkd
will be hanging on the "Configuring" status, unless I write the route manually (In this case, I must disablenetworkd-dispatcher
or the switch will failed).Want to know if there's any way to solve that, or can any maintainer consider providing an option to enable the GatewayOnlink within the
configuration.nix
.Expected behavior
Add an option so that I can enable GatewayOnLink without affecting the normal usage with cloud-init.