2019-03-20 02:57:59 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-03-20 02:57:59 +01:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
mkIf (elem "gitea" config.machine.services) {
|
2019-02-26 13:44:40 +01:00
|
|
|
services.gitea = {
|
|
|
|
enable = true;
|
|
|
|
user = "git";
|
|
|
|
cookieSecure = true;
|
|
|
|
domain = "git.ophanim.de";
|
|
|
|
rootUrl = "http://git.ophanim.de/";
|
|
|
|
database = {
|
|
|
|
type = "mysql";
|
|
|
|
user = "git";
|
|
|
|
name = "gitea";
|
|
|
|
passwordFile = "/secret/gitea";
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
[repository]
|
2019-03-04 10:35:50 +01:00
|
|
|
DISABLE_HTTP_GIT = false
|
2019-02-26 13:44:40 +01:00
|
|
|
USE_COMPAT_SSH_URI = true
|
|
|
|
|
|
|
|
[security]
|
|
|
|
INSTALL_LOCK = true
|
|
|
|
COOKIE_USERNAME = gitea_username
|
|
|
|
COOKIE_REMEMBER_NAME = gitea_userauth
|
|
|
|
|
|
|
|
[service]
|
|
|
|
DISABLE_REGISTRATION = true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.git = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/var/lib/gitea";
|
|
|
|
createHome = true;
|
|
|
|
};
|
|
|
|
}
|