profiles/hetzner-cloud: Migrate Hetzner VMs to Hetzner Cloud profile
This commit is contained in:
		@@ -1,8 +0,0 @@
 | 
			
		||||
{ ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  networking.useDHCP = false;
 | 
			
		||||
  networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
 | 
			
		||||
  networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
 | 
			
		||||
  networking.nameservers = [ "2a01:4ff:ff00::add:2" "2a01:4ff:ff00::add:1" "185.12.64.2" "185.12.64.1" ];
 | 
			
		||||
}
 | 
			
		||||
@@ -7,6 +7,8 @@
 | 
			
		||||
      ../../configuration/router
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  profiles.clerie.hetzner-cloud.enable = true;
 | 
			
		||||
 | 
			
		||||
  boot.loader.grub.enable = true;
 | 
			
		||||
  boot.loader.grub.device = "/dev/sda";
 | 
			
		||||
 | 
			
		||||
@@ -14,9 +16,6 @@
 | 
			
		||||
  # Network
 | 
			
		||||
  networking.interfaces.ens3.ipv4.addresses = [ { address = "78.47.183.82"; prefixLength = 32; } ];
 | 
			
		||||
  networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:c0c:15f1::1"; prefixLength = 64; } ];
 | 
			
		||||
  networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
 | 
			
		||||
  networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
 | 
			
		||||
  networking.nameservers = [ "213.133.98.98" "213.133.99.99" "213.133.100.100" ];
 | 
			
		||||
 | 
			
		||||
  networking.nat = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,14 +4,16 @@
 | 
			
		||||
  imports =
 | 
			
		||||
    [
 | 
			
		||||
      ./hardware-configuration.nix
 | 
			
		||||
      ../../configuration/hetzner-cloud
 | 
			
		||||
 | 
			
		||||
      ./mailcow.nix
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  profiles.clerie.hetzner-cloud.enable = true;
 | 
			
		||||
 | 
			
		||||
  boot.loader.grub.enable = true;
 | 
			
		||||
  boot.loader.grub.device = "/dev/sda";
 | 
			
		||||
 | 
			
		||||
  networking.useDHCP = false;
 | 
			
		||||
  networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:1c1c:9577::1"; prefixLength = 64; } ];
 | 
			
		||||
  networking.interfaces.ens3.ipv4.addresses = [ { address = "5.75.187.112"; prefixLength = 32; } ];
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,8 @@
 | 
			
		||||
      ./wetter.nix
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
  profiles.clerie.hetzner-cloud.enable = true;
 | 
			
		||||
 | 
			
		||||
  boot.loader.grub.enable = true;
 | 
			
		||||
  boot.loader.grub.device = "/dev/sda";
 | 
			
		||||
 | 
			
		||||
@@ -35,9 +37,6 @@
 | 
			
		||||
  # Network
 | 
			
		||||
  networking.interfaces.ens3.ipv4.addresses = [ { address = "88.99.187.135"; prefixLength = 32; } ];
 | 
			
		||||
  networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:c0c:c580::1"; prefixLength = 64; } ];
 | 
			
		||||
  networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
 | 
			
		||||
  networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
 | 
			
		||||
  networking.nameservers = [ "213.133.98.98" "213.133.99.99" "213.133.100.100" ];
 | 
			
		||||
 | 
			
		||||
  services.nginx = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./hetzner-cloud
 | 
			
		||||
    ./netcup
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								profiles/hetzner-cloud/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								profiles/hetzner-cloud/default.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
{ 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;
 | 
			
		||||
 | 
			
		||||
    networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
 | 
			
		||||
    networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
 };
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user