self-hosting/hardware/hcloud.nix

34 lines
869 B
Nix
Raw Normal View History

2023-05-17 15:06:15 +02:00
{ modulesPath, config, pkgs, ... }: {
2021-07-15 17:09:32 +02:00
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/sda";
2023-05-17 15:06:15 +02:00
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
2021-07-15 17:09:32 +02:00
2021-07-17 00:24:30 +02:00
time.timeZone = "Europe/Amsterdam";
2023-07-10 19:19:25 +02:00
boot.tmp.cleanOnBoot = true;
2021-07-15 17:09:32 +02:00
networking.firewall.allowPing = true;
networking.usePredictableInterfaceNames = false;
2023-05-17 15:06:15 +02:00
2023-12-13 18:51:56 +01:00
networking.useDHCP = false;
2023-05-17 15:06:15 +02:00
networking.dhcpcd.enable = false;
systemd.network = {
enable = true;
networks."10-wan" = {
matchConfig.Name = "eth0";
networkConfig.DHCP = "ipv4";
# make routing on this interface a dependency for network-online.target
linkConfig.RequiredForOnline = "routable";
};
networks."20-lan" = {
matchConfig.Name = "eth1";
networkConfig.DHCP = "ipv4";
linkConfig.RequiredForOnline = "routable";
};
};
2021-07-15 17:09:32 +02:00
}