self-hosting/hardware/hcloud.nix

33 lines
835 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";
2021-07-15 17:09:32 +02:00
boot.cleanTmpDir = true;
networking.firewall.allowPing = true;
networking.usePredictableInterfaceNames = 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
}