From ff645291e38722025c99be538776d07af31d718f Mon Sep 17 00:00:00 2001 From: mc-fucker Date: Fri, 4 Aug 2023 19:07:18 +0200 Subject: [PATCH] added authentik-ldap.nix --- modules/authentik-ldap.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/authentik-ldap.nix diff --git a/modules/authentik-ldap.nix b/modules/authentik-ldap.nix new file mode 100644 index 0000000..7b92368 --- /dev/null +++ b/modules/authentik-ldap.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs, ... }: +with lib; + +let + cfg = config.services.authentik-ldap; + conf = import ./vars.nix; +in +{ + options = { + services.authentik-ldap = { + token = mkOption { + type = types.str; + description = "The authentik_token as displayed in authentik."; + }; + }; + }; + + config = { + virtualisation.oci-containers.containers."authentik-ldap" = { + image = "ghcr.io/goauthentik/ldap"; + ports = [ + "389:3389" + "636:6636" + ]; + environment = { + AUTHENTIK_HOST = "https://${conf.authentik.domain}"; + AUTHENTIK_INSECURE = "false"; + AUTHENTIK_DEBUG = "true"; + AUTHENTIK_TOKEN = cfg.token; + }; + extraOptions = conf.podman.extraOptions; + }; + }; + +} +# vim: set et ts=2 sw=2 ai: