2024-08-07 21:51:43 +02:00
|
|
|
{ config, ... }:
|
2024-08-08 00:14:52 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
# ip addr
|
|
|
|
networkInterface = "enp0s31f6";
|
|
|
|
|
|
|
|
# From the Hetzner control panel
|
|
|
|
ipv4 = {
|
|
|
|
address = "95.216.66.212"; # the ip address
|
|
|
|
gateway = "95.216.66.193"; # the gateway ip address
|
|
|
|
netmask = "255.255.255.192"; # the netmask -- might not be the same for you!
|
|
|
|
prefixLength = 26; # must match the netmask, see <https://www.pawprint.net/designresources/netmask-converter.php>
|
|
|
|
};
|
|
|
|
ipv6 = {
|
|
|
|
address = "2a01:4f9:2b:326::2"; # the ipv6 addres
|
|
|
|
gateway = "fe80::1"; # the ipv6 gateway
|
|
|
|
prefixLength = 64; # shown in the control panel
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
systemd.network.networks."10-uplink".networkConfig.Address = ipv6.address;
|
|
|
|
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink";
|
|
|
|
|
|
|
|
# in rescue shell
|
|
|
|
# ---------------
|
|
|
|
# apt install -y lshw
|
|
|
|
# lshw -C network | grep -Poh 'driver=[[:alnum:]]+'
|
|
|
|
boot.initrd.kernelModules = [ "e1000e" ];
|
|
|
|
|
|
|
|
# Use GRUB2 as the boot loader.
|
|
|
|
# We don't use systemd-boot because Hetzner uses BIOS legacy boot.
|
|
|
|
boot.loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
efiSupport = false; # we created a ef02 partition because uefi is not supported on hetzner online machines.
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|