From da49d47bca0f359f674f8974b44a43e742406926 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 28 May 2024 11:09:29 -0700 Subject: [PATCH] Add LDAP port (and firewall ports) --- paris-container.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/paris-container.nix b/paris-container.nix index 435f1bb..da12e26 100644 --- a/paris-container.nix +++ b/paris-container.nix @@ -19,6 +19,12 @@ in { description = "Directory at which to store server state."; }; + ports = mkOption { + type = listOf port; + description = "List of ports to open to the public internet."; + default = [ ]; + }; + ldap = { image = mkOption { type = str; @@ -26,6 +32,12 @@ in { default = "ghcr.io/goauthentik/ldap:latest"; }; + port = mkOption { + type = port; + description = "Port on which to listen for LDAP requests."; + default = 4389; + }; + domain = mkOption { type = str; description = @@ -137,7 +149,7 @@ in { virtualisation.oci-containers.paris-ldap-proxy = { image = cfg.ldap.image; autoStart = true; - ports = [ "${cfg.ldap.port}:389" ]; + ports = [ "${toString cfg.ldap.port}:389" ]; environmentFiles = [ hostSecrets.parisLdapEnv.target-file ]; }; @@ -184,7 +196,7 @@ in { auth_provider = "ldap"; access_provider = "ldap"; - ldap_uri = "ldap://localhost:${cfg.ldap.port}"; + ldap_uri = "ldap://localhost:${toString cfg.ldap.port}"; ldap_schema = "rfc2307bis"; ldap_search_base = cfg.ldap.base;