nixos-config/machines/probe/hardware-configuration/hetzner.nix
2024-08-07 21:39:32 +02:00

22 lines
592 B
Nix

{ config, ... }:
{
# set up hetzner cloud network
systemd.network.enable = true;
systemd.network.networks."10-hetzner" = {
matchConfig.Name = "en*";
networkConfig.DHCP = "ipv4";
linkConfig.RequiredForOnline = "routable";
};
# set up hetzner cloud network during init
boot.initrd.systemd.network.networks."10-hetzner" = config.systemd.network.networks."10-hetzner";
boot.initrd.availableKernelModules = [ "virtio_pci" ]; # network kernel module
# set up hetzner boot loader
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
}