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}"; + }; + }; +}