nixos-configuration/hosts/hetzner-vpn2/hardware.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

2024-12-01 12:06:11 +01:00
{ lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
config = {
nixpkgs = {
hostPlatform = "aarch64-linux";
system = "aarch64-linux";
};
boot = {
tmp.cleanOnBoot = true;
2024-12-01 16:39:35 +01:00
kernelParams = [ "console=tty" ];
2024-12-01 12:06:11 +01:00
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [
"xhci_pci"
"virtio_scsi"
"sr_mod"
2024-12-01 16:39:35 +01:00
"virtio_gpu"
2024-12-01 12:06:11 +01:00
];
kernelModules = [ ];
};
};
fileSystems = {
"/" = {
2024-12-01 13:41:12 +01:00
device = "/dev/disk/by-uuid/3263489d-9819-433c-b198-9d2e732a94e4";
2024-12-01 12:06:11 +01:00
fsType = "ext4";
};
"/boot" = {
2024-12-01 13:41:12 +01:00
device = "/dev/disk/by-uuid/6C25-6BDC";
2024-12-01 12:06:11 +01:00
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
swapDevices = [
2024-12-01 13:41:12 +01:00
{ device = "/dev/disk/by-uuid/e147721d-86b5-40d7-a231-c6ea391c563d"; }
2024-12-01 12:06:11 +01:00
];
2024-12-01 16:39:35 +01:00
networking.useNetworkd = true;
systemd.network = {
enable = true;
networks."10-wan" = {
matchConfig.Name = "enp1s0";
networkConfig.DHCP = "ipv4";
address = [
"2a01:4f8:c013:65dd::1/64"
];
routes = [
{ Gateway = "fe80::1"; }
];
2024-12-01 12:06:11 +01:00
};
};
};
}