From a9e9032ab3918672e306729cdb63f9d5246a8be2 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 15 Apr 2023 18:09:41 +0200 Subject: [PATCH] Revert "wireguard/home: Add basic overview page" This reverts commit 642d97cb52c4323cbba2d9bb4070bc09312c3dae. --- modules/wireguard/home.nix | 40 +--------------------------- modules/wireguard/home/index.html.j2 | 22 --------------- modules/wireguard/home/style.css | 10 ------- 3 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 modules/wireguard/home/index.html.j2 delete mode 100644 modules/wireguard/home/style.css diff --git a/modules/wireguard/home.nix b/modules/wireguard/home.nix index dd37c36..f4b6693 100644 --- a/modules/wireguard/home.nix +++ b/modules/wireguard/home.nix @@ -1,4 +1,4 @@ -{ lib, config, machines, pkgs, ... }: +{ lib, config, pkgs, ... }: let serverHostName = "vueko"; serverPort = 51820; @@ -135,46 +135,8 @@ in $TTL 3600 @ IN SOA ${serverHostName}.sbruder.de. hostmaster.sbruder.de. ${toString serial} 28800 3600 604800 3600 @ IN NS ${serverHostName}.sbruder.de. - @ IN A ${peers.${serverHostName}.address} '' + peerRecords); }; }; - - services.nginx = lib.mkIf enableServer { - virtualHosts."vpn.sbruder.de" = { - root = - let - templateData = { - machines = lib.mapAttrs - (machine: { config, ... }: { - syncthing = if config.services.syncthing.enable then 8384 else null; - }) - machines; - }; - in - pkgs.stdenv.mkDerivation { - name = "vpn-home"; - - src = ./home; - - nativeBuildInputs = with pkgs; [ j2cli ]; - - buildPhase = '' - runHook preBuild - j2 -f json -o index.html index.html.j2 - << EOF - ${builtins.toJSON templateData} - EOF - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - install -D index.html $out/index.html - install -D style.css $out/style.css - runHook postInstall - ''; - }; - }; - }; }; } diff --git a/modules/wireguard/home/index.html.j2 b/modules/wireguard/home/index.html.j2 deleted file mode 100644 index fdab2ee..0000000 --- a/modules/wireguard/home/index.html.j2 +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - VPN - - - -
-

VPN

-

Machines

- {%- for machine, config in machines.items() %} - {%- set base_url = "http://" ~ machine ~ ".vpn.sbruder.de" %} -

{{ machine }}

- - {%- endfor %} -
- - diff --git a/modules/wireguard/home/style.css b/modules/wireguard/home/style.css deleted file mode 100644 index 5d1e675..0000000 --- a/modules/wireguard/home/style.css +++ /dev/null @@ -1,10 +0,0 @@ -body { - font-family: "PT Sans", "Helvetica", "Helvetica Neue", "Roboto", "Arimo", "Arial", sans-serif; - margin: 0px; -} - -.container { - max-width: 500px; - margin: 0 auto; - padding: 0 1rem; -}