From 0d7b4efbd3b232ba3b7958c7436cc225a3335dc1 Mon Sep 17 00:00:00 2001 From: soyouzpanda Date: Fri, 16 Aug 2024 23:20:11 +0200 Subject: [PATCH] feat(kahulm): Added kahulm to web01 --- machines/web01/_configuration.nix | 1 + machines/web01/kahulm.nix | 32 ++++++++++++++++++++ machines/web01/secrets/kahulm-session_secret | 28 +++++++++++++++++ machines/web01/secrets/secrets.nix | 1 + npins/sources.json | 16 +++++++++- 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 machines/web01/kahulm.nix create mode 100644 machines/web01/secrets/kahulm-session_secret diff --git a/machines/web01/_configuration.nix b/machines/web01/_configuration.nix index 8cb9425..da1e784 100644 --- a/machines/web01/_configuration.nix +++ b/machines/web01/_configuration.nix @@ -19,6 +19,7 @@ lib.extra.mkConfig { "static" "wordpress" "netbox" + "kahulm" ]; extraConfig = { diff --git a/machines/web01/kahulm.nix b/machines/web01/kahulm.nix new file mode 100644 index 0000000..e947881 --- /dev/null +++ b/machines/web01/kahulm.nix @@ -0,0 +1,32 @@ +{ sources, config, ... }: +let + host = "kahulm.normalesup.eu"; + port = 3009; +in +{ + imports = [ (sources.kahulm + "/module.nix") ]; + + services.kahulm = { + inherit port; + enable = true; + baseUrl = "https://${host}"; + sessionSecretFile = config.age.secrets.kahulm-session_secret.path; + }; + + services.nginx = { + enable = true; + + virtualHosts.${host} = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${builtins.toString port}"; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; +} diff --git a/machines/web01/secrets/kahulm-session_secret b/machines/web01/secrets/kahulm-session_secret new file mode 100644 index 0000000..d8afbfb --- /dev/null +++ b/machines/web01/secrets/kahulm-session_secret @@ -0,0 +1,28 @@ +age-encryption.org/v1 +-> ssh-ed25519 jIXfPA N+d61BeAAJsN9yuUaIAyaeqTxwu/y7fDxTEUZ4Xb2T8 +qisM6kKQfgXqi+8KtX8l61n6axSTOO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