nixos-config/machines/probe/hardware-configuration/hetzner.nix
Ingolf Wagner 9b7ff29143
refactor
2024-08-07 22:03:11 +02:00

22 lines
589 B
Nix

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