diff --git a/machines/labcore01/_configuration.nix b/machines/labcore01/_configuration.nix
index 5c0b9f5..01e49f2 100644
--- a/machines/labcore01/_configuration.nix
+++ b/machines/labcore01/_configuration.nix
@@ -8,6 +8,7 @@ lib.extra.mkConfig {
enabledServices = [
# List of services to enable
"unbound"
+ "nginx"
];
extraConfig = { };
diff --git a/machines/labcore01/kfet/favicon.png b/machines/labcore01/kfet/favicon.png
new file mode 100644
index 0000000..56fb429
Binary files /dev/null and b/machines/labcore01/kfet/favicon.png differ
diff --git a/machines/labcore01/kfet/index.html b/machines/labcore01/kfet/index.html
new file mode 100644
index 0000000..501a2de
--- /dev/null
+++ b/machines/labcore01/kfet/index.html
@@ -0,0 +1,93 @@
+
+
+
+
+
+ Ouverture K-Fêt
+
+
+
+
+
+
Non défini
+
Fermé
+
Ouvert
+
+
+
+
diff --git a/machines/labcore01/nginx.nix b/machines/labcore01/nginx.nix
new file mode 100644
index 0000000..9083b67
--- /dev/null
+++ b/machines/labcore01/nginx.nix
@@ -0,0 +1,8 @@
+{
+ dgn-web.enable = true;
+ services.nginx.virtualHosts."kfet.lab.dgnum.eu" = {
+ enableACME = true;
+ forceSSL = true;
+ root = ./kfet;
+ };
+}
diff --git a/machines/router02/_configuration.nix b/machines/router02/_configuration.nix
index bcbef26..229f36b 100644
--- a/machines/router02/_configuration.nix
+++ b/machines/router02/_configuration.nix
@@ -9,6 +9,7 @@ lib.extra.mkConfig {
# List of services to enable
"networking"
"wireguard"
+ "nginx-sni"
];
extraConfig = { };
diff --git a/machines/router02/nginx-sni.nix b/machines/router02/nginx-sni.nix
new file mode 100644
index 0000000..ee8d586
--- /dev/null
+++ b/machines/router02/nginx-sni.nix
@@ -0,0 +1,21 @@
+{ meta, ... }:
+let
+ # Beware, jool will not translate. Prefer ipv6 proxy target
+ machines = builtins.mapAttrs (
+ host: { site, ... }: "v6.${host}.${site}.infra.lab.dgnum.eu:443"
+ ) meta.nodes;
+in
+{
+ dgn-web.enable = true;
+ services.nginx = {
+ sni-proxy = {
+ preStreamConfig = ''
+ resolver 127.0.0.53;
+ '';
+ enable = true;
+ redirects = {
+ "kfet.lab.dgnum.eu" = machines.labcore01;
+ };
+ };
+ };
+}
diff --git a/modules/default.nix b/modules/default.nix
index 40161a5..f0a7005 100644
--- a/modules/default.nix
+++ b/modules/default.nix
@@ -9,6 +9,9 @@
++ [
"${sources."microvm.nix"}/nixos-modules/host"
(import sources.proxmox-nixos).nixosModules.declarative-vms
+ ]
+ ++ (import sources.nix-modules { inherit lib; }).importModules [
+ "services/nginx-sni"
];
dgn-notify.enable = false;