nixos-config/machines/probe/hardware-configuration/hetzner.nix

23 lines
589 B
Nix
Raw Normal View History

{ config, ... }:
2024-06-21 23:25:17 +02:00
{
# set up hetzner cloud network
2024-06-21 23:25:17 +02:00
systemd.network.enable = true;
2024-08-07 22:03:11 +02:00
systemd.network.networks."10-uplink" = {
2024-06-21 23:25:17 +02:00
matchConfig.Name = "en*";
networkConfig.DHCP = "ipv4";
linkConfig.RequiredForOnline = "routable";
};
# set up hetzner cloud network during init
2024-08-07 22:03:11 +02:00
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
2024-06-21 23:25:17 +02:00
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
2024-06-21 23:25:17 +02:00
}