{ config, lib, ... }:

with lib;

{

  options.profiles.clerie.hetzner-cloud = {
    enable = mkEnableOption "Profile for Hetzner Cloud VMs";
  };

  config = mkIf config.profiles.clerie.hetzner-cloud.enable {

    services.qemuGuest.enable = true;

    systemd.network.networks."10-wan" = {
      matchConfig.Name = "ens3";
      routes = [
        { Gateway = "fe80::1"; }
        { Gateway = "172.31.1.1"; GatewayOnLink = true; }
      ];
      linkConfig.RequiredForOnline = "routable";
    };

    networking.nameservers = [
      # There are two different batches of DNS servers
      # This one
      "2a01:4ff:ff00::add:2" "2a01:4ff:ff00::add:1"
      "185.12.64.2" "185.12.64.1"
      # And that one
      "213.133.98.98" "213.133.99.99" "213.133.100.100"
      # Couldn't find out which to use
    ];

 };

}