aboutsummaryrefslogtreecommitdiff
path: root/hosts/eurovm/hardware.nix
blob: 443175ecaf2d6a681006b8389fa7ba22f921d24d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ modulesPath, ... }:

{
  imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];

  # Hetzner Cloud uses virtio block devices and a BIOS boot (non-EFI for older
  # instances; newer CX instances support UEFI - disko.nix uses GPT + BIOS-boot
  # partition so it works on both).
  boot.loader.grub = {
    enable = true;
    # disko will set boot.loader.grub.device via the disk configuration
  };

  boot.initrd.availableKernelModules = [
    "ata_piix"
    "uhci_hcd"
    "virtio_pci"
    "virtio_scsi"
    "sd_mod"
    "sr_mod"
  ];

  # Hetzner Cloud networking: single public interface
  networking = {
    useDHCP = false;
    interfaces.eth0.useDHCP = true;
    # IPv6 is assigned via SLAAC on Hetzner
    interfaces.eth0.ipv6.addresses = [];
  };
}