Install NixOS on Hetzner Cloud: Difference between revisions
Clean out uneccesray Beiwerk |
Fix intendation of code blocks |
||
Line 312: | Line 312: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
systemd.network.enable = true; | |||
systemd.network.networks."30-wan" = { | |||
matchConfig.Name = "ens3"; # either ens3 or enp1s0, check 'ip addr' | |||
networkConfig.DHCP = "ipv4"; | |||
address = [ | |||
# replace this subnet with the one assigned to your instance | |||
"2a01:4f8:aaaa:bbbb::1/64" | |||
]; | |||
routes = [ | |||
{ Gateway = "fe80::1"; } | |||
]; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 331: | Line 330: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
systemd.network.networks."30-wan" = { | |||
matchConfig.Name = "ens3"; # either ens3 (amd64) or enp1s0 (arm64) | |||
networkConfig.DHCP = "no"; | |||
address = [ | |||
# replace this address with the one assigned to your instance | |||
"A.B.C.D/32" | |||
# replace this subnet with the one assigned to your instance | |||
"2a01:4f8:AAAA:BBBB::1/64" | |||
]; | |||
routes = [ | |||
{ Gateway = "172.31.1.1"; GatewayOnLink = true; } | |||
{ Gateway = "fe80::1"; } | |||
]; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||