2024-08-07 21:32:49 +02:00
|
|
|
{ config, ... }:
|
2024-06-21 23:25:17 +02:00
|
|
|
{
|
2024-08-07 21:25:21 +02:00
|
|
|
|
2024-08-07 21:32:49 +02:00
|
|
|
# set up hetzner cloud network
|
|
|
|
systemd.network.enable = true;
|
2024-08-07 21:25:21 +02:00
|
|
|
systemd.network.networks."10-hetzner" = {
|
2024-08-07 21:32:49 +02:00
|
|
|
matchConfig.Name = "en*";
|
2024-06-21 23:25:17 +02:00
|
|
|
networkConfig.DHCP = "ipv4";
|
|
|
|
linkConfig.RequiredForOnline = "routable";
|
|
|
|
};
|
2024-08-07 21:25:21 +02:00
|
|
|
|
2024-08-07 21:32:49 +02:00
|
|
|
# set up hetzner cloud network during init
|
2024-08-07 21:25:21 +02:00
|
|
|
boot.initrd.systemd.network.networks."10-hetzner" = config.systemd.network.networks."10-hetzner";
|
2024-08-07 21:32:49 +02:00
|
|
|
boot.initrd.availableKernelModules = [ "virtio_pci" ]; # network kernel module
|
2024-08-07 21:25:21 +02:00
|
|
|
|
2024-08-07 21:32:49 +02:00
|
|
|
# set up hetzner boot loader
|
2024-06-21 23:25:17 +02:00
|
|
|
boot.loader.grub = {
|
|
|
|
efiSupport = true;
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
};
|
2024-08-07 21:25:21 +02:00
|
|
|
|
2024-06-21 23:25:17 +02:00
|
|
|
}
|