From 843f8d6a027186d9c72184d74d5c468a802402e1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 30 Dec 2025 22:17:43 +0900 Subject: [PATCH] bekkalokk/alps: init --- hosts/bekkalokk/configuration.nix | 1 + hosts/bekkalokk/services/alps.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hosts/bekkalokk/services/alps.nix diff --git a/hosts/bekkalokk/configuration.nix b/hosts/bekkalokk/configuration.nix index 61ae4f0..d1d26d3 100644 --- a/hosts/bekkalokk/configuration.nix +++ b/hosts/bekkalokk/configuration.nix @@ -5,6 +5,7 @@ (fp /base) + ./services/alps.nix ./services/bluemap.nix ./services/idp-simplesamlphp ./services/kerberos.nix diff --git a/hosts/bekkalokk/services/alps.nix b/hosts/bekkalokk/services/alps.nix new file mode 100644 index 0000000..0f75f04 --- /dev/null +++ b/hosts/bekkalokk/services/alps.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: +let + cfg = config.services.alps; +in +{ + services.alps = { + enable = true; + theme = "sourcehut"; + smtps.host = "smtp.pvv.ntnu.no"; + imaps.host = "imap.pvv.ntnu.no"; + bindIP = "127.0.0.1"; + }; + + services.nginx.virtualHosts."alps.pvv.ntnu.no" = lib.mkIf cfg.enable { + enableACME = true; + forceSSL = true; + kTLS = true; + locations."/" = { + proxyPass = "http://${cfg.bindIP}:${toString cfg.port}"; + }; + }; +}