2023-06-28 08:45:01 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
|
|
let
|
2023-08-04 18:13:54 +02:00
|
|
|
cfg = config.services.authentik-proxy;
|
2023-06-28 08:45:01 +02:00
|
|
|
conf = import ./vars.nix;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
options = {
|
2023-08-04 18:13:54 +02:00
|
|
|
services.authentik-proxy = {
|
2023-06-28 08:45:01 +02:00
|
|
|
token = mkOption {
|
|
|
|
|
type = types.str;
|
|
|
|
|
description = "The authentik_token as displayed in authentik.";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
config = {
|
2023-08-04 18:13:54 +02:00
|
|
|
virtualisation.oci-containers.containers."authentik-proxy" = {
|
2023-06-28 08:45:01 +02:00
|
|
|
image = "ghcr.io/goauthentik/proxy";
|
|
|
|
|
ports = [ "9001:9000" ];
|
|
|
|
|
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:
|