Merge pull request #68 from quentinmit/ak-properties

module: support additional properties in "ak"
This commit is contained in:
Maximilian Bosch 2025-08-29 16:03:43 +02:00 committed by GitHub
commit a31bbcc1bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -196,13 +196,17 @@ in
# `systemd-run(1)` in order to spin up an environment with correct (dynamic) user, # `systemd-run(1)` in order to spin up an environment with correct (dynamic) user,
# state directory and environment to run `ak` inside. # state directory and environment to run `ak` inside.
(k: vs: map (v: "--property ${k}=${if isBool v then boolToString v else toString v}") (toList vs)) (k: vs: map (v: "--property ${k}=${if isBool v then boolToString v else toString v}") (toList vs))
# Read serviceDefaults from `authentik.service`. That way, module system primitives (mk*) # Read properties from `authentik.service`. That way, users can customize the properties using
# can be used inside `serviceDefaults` and it doesn't need to be evaluated here again. # module system primitives and the like.
( (
getAttrs (attrNames serviceDefaults) config.systemd.services.authentik.serviceConfig removeAttrs config.systemd.services.authentik.serviceConfig [
// { "ExecStart"
StateDirectory = "authentik"; "ExecStartPre"
} "Restart"
"RestartSec"
# systemd-run doesn't expand the %S specifier, so this is passed separately below.
"WorkingDirectory"
]
) )
); );
in in