|
|
@ -19,32 +19,35 @@ mkIf (elem "gitea" config.machine.services) { |
|
|
|
name = "gitea"; |
|
|
|
passwordFile = "${cfg.secretPath}/gitea_db"; |
|
|
|
}; |
|
|
|
extraConfig = '' |
|
|
|
[repository] |
|
|
|
DISABLE_HTTP_GIT = false |
|
|
|
USE_COMPAT_SSH_URI = true |
|
|
|
settings = { |
|
|
|
repository = { |
|
|
|
DISABLE_HTTP_GIT = false; |
|
|
|
USE_COMPAT_SSH_URI = true; |
|
|
|
}; |
|
|
|
|
|
|
|
[security] |
|
|
|
INSTALL_LOCK = true |
|
|
|
COOKIE_USERNAME = gitea_username |
|
|
|
COOKIE_REMEMBER_NAME = gitea_userauth |
|
|
|
security = { |
|
|
|
INSTALL_LOCK = true; |
|
|
|
COOKIE_USERNAME = "gitea_username"; |
|
|
|
COOKIE_REMEMBER_NAME = "gitea_userauth"; |
|
|
|
}; |
|
|
|
|
|
|
|
[service] |
|
|
|
DISABLE_REGISTRATION = true |
|
|
|
''; |
|
|
|
service = { |
|
|
|
DISABLE_REGISTRATION = (lib.mkForce true); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
mysql = let |
|
|
|
cfg = config.services.gitea.database; |
|
|
|
in { |
|
|
|
ensureDatabases = [ cfg.name ]; |
|
|
|
ensureUsers = [{ |
|
|
|
name = cfg.user; |
|
|
|
ensurePermissions = { |
|
|
|
"${cfg.name}.*" = "ALL PRIVILEGES"; |
|
|
|
}; |
|
|
|
}]; |
|
|
|
}; |
|
|
|
# mysql = let |
|
|
|
# cfg = config.services.gitea.database; |
|
|
|
# in { |
|
|
|
# ensureDatabases = [ cfg.name ]; |
|
|
|
# ensureUsers = [{ |
|
|
|
# name = cfg.user; |
|
|
|
# ensurePermissions = { |
|
|
|
# "${cfg.name}.*" = "ALL PRIVILEGES"; |
|
|
|
# }; |
|
|
|
# }]; |
|
|
|
# }; |
|
|
|
}; |
|
|
|
|
|
|
|
users.users.git = { |
|
|
|