gitea adminify

This commit is contained in:
soraefir
2026-05-11 22:45:34 +02:00
parent fbe8399886
commit b82033f857
2 changed files with 15 additions and 0 deletions

View File

@@ -82,4 +82,18 @@ in {
};
};
};
setup = {
trigger = "server";
script = pkgs.writeShellScript "setup" ''
# Define the command wrapper
GT="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."CUSTOM".path} -e DOMAIN=${serverCfg.hostDomain} -u root gitea-server gitea"
$GT admin user create --admin --username "$DEFAULT_ADMIN_USERNAME" --password "$DEFAULT_ADMIN_PASSWORD" --email "$DEFAULT_ADMIN_EMAIL" || true
$GT admin user change --username "$DEFAULT_ADMIN_USERNAME" --admin
echo "Completed Gitea Setup"
'';
};
}