fix setup gitea

This commit is contained in:
soraefir
2026-05-14 16:01:52 +02:00
parent e777a56816
commit c069079a3a

View File

@@ -113,7 +113,7 @@ in {
script = pkgs.writeShellScript "setup" '' script = pkgs.writeShellScript "setup" ''
# Define the command wrapper # Define the command wrapper
GT="${pkgs.podman}/bin/podman --events-backend=none exec -u git gitea-server gitea" GT="${pkgs.podman}/bin/podman --events-backend=none exec -u git gitea-server gitea"
GTR="${pkgs.podman}/bin/podman --events-backend=none exec gitea-runner ./act_runner" GTR="${pkgs.podman}/bin/podman --events-backend=none exec -u git gitea-runner ./act_runner"
$GT admin user create --username "$DEFAULT_ADMIN_USERNAME" --password "$DEFAULT_ADMIN_PASSWORD" --email "$DEFAULT_ADMIN_EMAIL" --admin || true $GT admin user create --username "$DEFAULT_ADMIN_USERNAME" --password "$DEFAULT_ADMIN_PASSWORD" --email "$DEFAULT_ADMIN_EMAIL" --admin || true
@@ -129,8 +129,8 @@ in {
${lib.optionalString (serverCfg.containers ? authentik) '' ${lib.optionalString (serverCfg.containers ? authentik) ''
$GT admin auth list delete --id 1 $GT admin auth delete --id 1
$GT admin auth add_ldap --name Authentik --host authentik-ldap --port 3389 --security-protocol unencrypted \ $GT admin auth add-ldap --name Authentik --host authentik-ldap --port 3389 --security-protocol unencrypted \
--bind-dn "cn=ldap-service,ou=users,${LDAP_DC_DOMAIN}" --bind-password $DEFAULT_LDAP_PASSWORD \ --bind-dn "cn=ldap-service,ou=users,${LDAP_DC_DOMAIN}" --bind-password $DEFAULT_LDAP_PASSWORD \
--user-search-base "ou=users,${LDAP_DC_DOMAIN}" --user-filter "(|(username=%s)(email=%s))" \ --user-search-base "ou=users,${LDAP_DC_DOMAIN}" --user-filter "(|(username=%s)(email=%s))" \
--username-attribute "username" --firstname-attribute "givenName" --surname-attribute "sn" --email-attribute "mail" \ --username-attribute "username" --firstname-attribute "givenName" --surname-attribute "sn" --email-attribute "mail" \