feat(modules,gitea): update gitea module

This commit is contained in:
Guz
2026-01-01 19:27:56 -03:00
parent efd4dd587b
commit 0a42701e79

View File

@@ -158,7 +158,7 @@ in {
};
};
systemd.services.gitea-secrets = mkIf (!cfg.useWizard) {
systemd.services.gitea-secrets = {
description = "Gitea secret bootstrap helper";
script = ''
if [ ! -s '${cfg.secrets.security.SECRET_KEY}' ]; then
@@ -200,7 +200,7 @@ in {
++ optionals (cfg.database.type == "mysql") [
"mysql.service"
]
++ optionals (!cfg.useWizard) [
++ [
"gitea-secrets.service"
];
requires =
@@ -210,7 +210,7 @@ in {
++ optionals (cfg.database.createDatabase && cfg.database.type == "mysql") [
"mysql.service"
]
++ optionals (!cfg.useWizard) [
++ [
"gitea-secrets.service"
];
@@ -218,7 +218,7 @@ in {
# https://github.com/NixOS/nixpkgs/blob/20c4598c84a671783f741e02bf05cbfaf4907cff/nixos/modules/services/misc/forgejo.nix#L696
preStart = ''
# copy custom configuration and generate random secrets if needed
${optionalString (!cfg.useWizard) ''
${''
function gitea_setup {
config='${cfg.customDir}/conf/app.ini'
cp -f '${format.generate "app.ini" cfg.settings}' "$config"