gitea #8

Merged
pleshevskiy merged 4 commits from gitea into main 2022-10-18 23:57:09 +03:00
2 changed files with 42 additions and 2 deletions
Showing only changes of commit bc9dbf0881 - Show all commits

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ config, pkgs, ... }:
let
data = import ../../data.nix;
@ -10,6 +10,7 @@ in
./mail-accounts.nix
../modules/common.nix
../modules/nix.nix
../modules/nginx.nix
];
boot.cleanTmpDir = true;
@ -24,7 +25,6 @@ in
defaults.email = "dmitriy@pleshevski.ru";
};
# See: https://nixos-mailserver.readthedocs.io/en/latest/options.html
mailserver = {
enable = true;
@ -37,4 +37,33 @@ in
hierarchySeparator = "/";
};
services.postgresql = {
enable = true;
package = pkgs.postgresql_14;
};
services.gitea = {
enable = true;
httpPort = 9901;
domain = "nix-git.pleshevski.ru";
rootUrl = "https://nix-git.pleshevski.ru";
database = {
type = "postgres";
host = "/run/postgresql";
port = config.services.postgresql.port;
};
settings = {
log.LEVEL = "Error";
service.DISABLE_REGISTRATION = true;
metrics.ENABLED = true;
server.DISABLE_ROUTER_LOG = true;
};
};
services.nginx.virtualHosts."nix-git.pleshevski.ru" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString config.services.gitea.httpPort}/";
};
}

View file

@ -0,0 +1,11 @@
{
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}