about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-03-05 23:35:20 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-03-05 23:35:20 +0100
commit1190f91d696a231d086ac87e42e8351519831e31 (patch)
treeb1fb951e92ef269cab30d251bf064daf68e28fe8
parent60798134c952adfd068ec844296a652720134102 (diff)
Remove all references to "heinrich"
This was a very old effort to NixOSify "heinrich" which unfortunately
didn't happen and I'm not sure whether "heinrich" even exists anymore.

The tests were broken anyway, so I doubt anyone would grief over it.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--machines/default.nix3
-rw-r--r--machines/labnet/heinrich.nix143
-rw-r--r--tests/default.nix3
-rw-r--r--tests/labnet/heinrich.nix51
4 files changed, 1 insertions, 199 deletions
diff --git a/machines/default.nix b/machines/default.nix
index d15bd7eb..f3cb8d60 100644
--- a/machines/default.nix
+++ b/machines/default.nix
@@ -15,8 +15,7 @@ in {
     };
   };
   labnet = {
-    heinrich = callMachine ./labnet/heinrich.nix {};
-    labtop   = callMachine ./labnet/labtop.nix {};
+    labtop = callMachine ./labnet/labtop.nix {};
   };
   profpatsch = {
     katara = callMachine ./profpatsch/katara.nix {};
diff --git a/machines/labnet/heinrich.nix b/machines/labnet/heinrich.nix
deleted file mode 100644
index 64601314..00000000
--- a/machines/labnet/heinrich.nix
+++ /dev/null
@@ -1,143 +0,0 @@
-{ config, lib, ... }:
-
-with lib;
-
-let
-  routes = {
-    moritz = {
-      id = 14;
-      address = "192.168.0.12";
-      prefixLength = 24;
-      gateway = "192.168.0.1";
-      destination = "144.76.143.122";
-    };
-
-    hotelturm = {
-      id = 8;
-      address = "10.11.77.5";
-      prefixLength = 24;
-      gateway = "10.11.77.16";
-      destination = "10.11.7.0/24";
-    };
-  };
-
-  internalIf = config.vuizvui.machines.heinrich.internalInterface;
-  externalIf = config.vuizvui.machines.heinrich.externalInterface;
-
-  mkRouteConfig = name: cfg: {
-    key = "routes-${name}";
-
-    networking.vlans.${name} = {
-      inherit (cfg) id;
-      interface = externalIf;
-    };
-
-    networking.interfaces.${name}.ip4 = singleton {
-      inherit (cfg) address prefixLength;
-    };
-
-    systemd.network.networks."40-${name}".routes = singleton {
-      routeConfig.Gateway = cfg.gateway;
-      routeConfig.Destination = cfg.destination;
-    };
-  };
-
-in {
-  imports = mapAttrsToList mkRouteConfig routes;
-
-  options.vuizvui.machines.heinrich = {
-    internalInterface = mkOption {
-      type = types.str;
-      default = "enp7s0";
-      description = ''
-        The internal network interface where Heinrich is serving DHCP and DNS
-        requests.
-      '';
-    };
-
-    externalInterface = mkOption {
-      type = types.str;
-      default = "enp5s0";
-      description = ''
-        The external network interface where Heinrich is connected to the
-        internet.
-      '';
-    };
-  };
-
-  config = {
-    networking.useDHCP = false;
-    networking.interfaces.${externalIf}.ip4 = mkForce [];
-    networking.interfaces.${internalIf}.ip4 = lib.singleton {
-      address = "172.16.0.1";
-      prefixLength = 24;
-    };
-
-    services.dnsmasq.enable = true;
-    services.dnsmasq.resolveLocalQueries = false;
-    services.dnsmasq.extraConfig = ''
-      dhcp-range=172.16.0.100,172.16.0.254,12h
-
-      dhcp-option=3,172.16.0.1 # Gateway
-      dhcp-option=6,172.16.0.1 # DNS-server
-
-      local=/openlab.lan/
-      domain=openlab.lan
-
-      dhcp-leasefile=/var/db/dnsmasq/dhcp.leases
-    '';
-
-    systemd.services.dnsmasq-pre = {
-      description = "Pre-Init DNSMasq";
-      before = [ "dnsmasq.service" ];
-      wantedBy = [ "multi-user.target" ];
-      script = ''
-        mkdir -p /var/db/dnsmasq
-        chown dnsmasq:nogroup /var/db/dnsmasq
-      '';
-      serviceConfig.Type = "oneshot";
-      serviceConfig.RemainAfterExit = true;
-    };
-
-    users.motd = ''
-      0. Never touch a running system.
-      1. Dokumentiere alle trotz 0 erfolgten Änderungen im Github-Repo:
-         https://github.com/openlab-aux/labnetz-doku
-      2. Mit großer Macht geht große Verantwortung einher.
-      3. So weit!
-      4. ...
-      5. Reisst dir Hannes den Arsch auf, wenn Du die Punkte 0-2 ignorierst.
-    '';
-
-    # TODO: This is a dummy, replace it once we know about the real root fs.
-    fileSystems."/".label = "root";
-    boot.loader.grub.device = "nodev";
-
-    networking.useNetworkd = true;
-    networking.firewall.enable = false;
-    networking.nat.enable = true;
-    networking.nat.externalIP = routes.hotelturm.address;
-    networking.nat.externalInterface = "hotelturm";
-    networking.nat.internalIPs = [ "172.16.0.1/24" ];
-    networking.nat.internalInterfaces = [ internalIf ];
-
-    /* TODO!
-    services.openvpn.enable = true;
-    services.openvpn.servers.heinrich.config = ''
-      dev tun0
-      remote 144.76.143.122
-      ifconfig 10.9.8.2 10.9.8.1
-      secret /etc/openvpn/priv.key
-
-      comp-lzo
-
-      keepalive 10 60
-      ping-timer-rem
-      persist-tun
-      persist-key
-
-      route 0.0.0.0 0.0.0.0
-    '';
-    */
-  };
-}
diff --git a/tests/default.nix b/tests/default.nix
index 77fb3073..eb4f3b81 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -9,9 +9,6 @@ in {
   aszlig = {
     i3 = callTest ./aszlig/i3.nix;
   };
-  labnet = {
-    heinrich = callTest ./labnet/heinrich.nix;
-  };
   richi235 = {
     # Currently broken
     #multipath-vpn = callTest ./richi235/multipath-vpn.nix;
diff --git a/tests/labnet/heinrich.nix b/tests/labnet/heinrich.nix
deleted file mode 100644
index a7839c42..00000000
--- a/tests/labnet/heinrich.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-  name = "heinrich";
-
-  nodes = let
-    common = { lib, ... }: {
-      networking.useNetworkd = true;
-      systemd.network.netdevs."40-eth0".netdevConfig = {
-        Name = "eth0";
-        Kind = "dummy";
-      };
-    };
-  in {
-    heinrich = {
-      imports = [ common (import ../../machines {}).labnet.heinrich.config ];
-      virtualisation.vlans = [ 1 8 14 ];
-      vuizvui.machines.heinrich.internalInterface = "eth1";
-      vuizvui.machines.heinrich.externalInterface = "eth2";
-    };
-    hotelturm = { lib, ... }: {
-      imports = [ common ];
-      virtualisation.vlans = [ 8 ];
-      networking.useDHCP = false;
-      networking.interfaces.eth1.ip4 = lib.singleton {
-        address = "10.11.77.16";
-        prefixLength = 24;
-      };
-    };
-    moritz = { lib, ... }: {
-      imports = [ common ];
-      virtualisation.vlans = [ 14 ];
-      networking.useDHCP = false;
-      networking.interfaces.eth1.ip4 = lib.singleton {
-        address = "192.168.0.1";
-        prefixLength = 24;
-      };
-    };
-    client = {
-      imports = [ common ];
-      virtualisation.vlans = [ 1 ];
-    };
-  };
-
-  testScript = ''
-    startAll;
-    $heinrich->waitForUnit("dnsmasq.service");
-    $client->waitForUnit("network-interfaces.target");
-    $client->waitForUnit("network.target");
-
-    $client->succeed("ip addr >&2");
-  '';
-}