gitea
This commit is contained in:
31
modules/servers/gitea.nix
Normal file
31
modules/servers/gitea.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.servers.gitea;
|
||||
setup = import ./setup.nix { inherit lib config; };
|
||||
in
|
||||
{
|
||||
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
|
||||
config.services = {
|
||||
gitea = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
appName = "Danilo Git";
|
||||
domain = cfg.host;
|
||||
rootUrl = cfg.url;
|
||||
settings = {
|
||||
session.COOKIE_SECURE = true;
|
||||
server = {
|
||||
HTTP_PORT = cfg.port;
|
||||
START_SSH_SERVER = true;
|
||||
SSH_PORT = 2222;
|
||||
SSH_LISTEN_PORT = 2222;
|
||||
};
|
||||
};
|
||||
database = {
|
||||
socket = config.my.postgresSocket;
|
||||
type = "postgres";
|
||||
createDatabase = false;
|
||||
};
|
||||
};
|
||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
|
||||
};
|
||||
}
|
||||
@@ -37,6 +37,7 @@ let
|
||||
"matrix-synapse"
|
||||
"readeck"
|
||||
"sonarqube"
|
||||
"gitea"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user