NixOS on Hetzner cloud servers: IPv6

This is my networking setup on Hetzner Cloud:

# Networking
networking.defaultGateway6 = { address = "fe80::1"; interface = "eth0"; };
networking.interfaces.eth0.ipv6.addresses = [ { address = "${cfg.ipv6}"; prefixLength = 64; } ];

cfg.ipv6 is the assigned IPv6 address (...::2, not ...::1)

EDIT: Actually it seems to be ...::2 for ARM servers and ...::1 for x86 servers

You have the whole subnet, which is a /64, which means the last 64 bits are free for you to pick from. Everything in there will work.

I would recommend using the networkd configuration as described in the wiki:

https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud#Network_configuration

Hm at least when I tried back then it did not work with ::1, but that may also be a configuration issue on my end