Install NixOS on Hetzner Cloud: Difference between revisions

Hexa (talk | contribs)
→‎Static IPv4 configuration: Missing match config
Hexa (talk | contribs)
m →‎Network configuration: swap nowiki for syntaxhighlighting
Line 47: Line 47:
Hetzner Cloud offers both IPv4 (/32 subnet) and IPv6 (/64 subnet) connectivity to each machine. The assigned addresses can be looked up on the [https://console.hetzner.cloud Hetzner Cloud Console] from the "Networking" tab on the instance details. The public IPv4 address of the server can automatically obtained be via DHCP. For IPv6 you have to statically configure both address and gateway.
Hetzner Cloud offers both IPv4 (/32 subnet) and IPv6 (/64 subnet) connectivity to each machine. The assigned addresses can be looked up on the [https://console.hetzner.cloud Hetzner Cloud Console] from the "Networking" tab on the instance details. The public IPv4 address of the server can automatically obtained be via DHCP. For IPv6 you have to statically configure both address and gateway.


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
<syntaxhighlight lang="nix">
   systemd.network.enable = true;
   systemd.network.enable = true;
   systemd.network.networks."30-wan" = {
   systemd.network.networks."30-wan" = {
Line 60: Line 60:
     ];
     ];
   };
   };
</nowiki>}}
</syntaxhighlight>


=== Static IPv4 configuration ===
=== Static IPv4 configuration ===