1
0

Move gitea to web-2

This commit is contained in:
clerie 2021-01-06 22:02:11 +01:00
parent f8c47a55c7
commit c8e98afaae
2 changed files with 88 additions and 0 deletions

View File

@ -6,6 +6,7 @@
./hardware-configuration.nix
../../configuration/common
./bubblesort.nix
./gitea.nix
./ip.nix
./meow.nix
./radicale.nix
@ -48,6 +49,11 @@
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.postgresql = {
enable = true;
package = pkgs.postgresql_12;
};
services.borgbackup.jobs = {
main = {
paths = [

82
hosts/web-2/gitea.nix Normal file
View File

@ -0,0 +1,82 @@
{ ... }:
{
clerie.gitea = {
enable = true;
appName = "clerie Git";
database = {
createDatabase = false;
type = "postgres";
name = "gitea";
user = "gitea";
socket = "/run/postgresql";
};
cookieSecure = true;
disableRegistration = true;
rootUrl = "https://git.clerie.de/";
domain = "git.clerie.de";
httpAddress = "127.0.0.1";
httpPort = 3000;
lfs.enable = true;
log.level = "Info";
ssh.enable = true;
settings = {
database = {
CHARSET = "utf8";
};
repository = {
ENABLE_PUSH_CREATE_USER = true;
ENABLE_PUSH_CREATE_ORG = true;
DEFAULT_PRIVATE = true;
};
server = {
OFFLINE_MODE = true;
LANDING_PAGE = "explore";
};
mailer = {
enabled = false;
};
service = {
REGISTER_EMAIL_CONFIRM = false;
ENABLE_NOTIFY_MAIL = false;
ALLOW_ONLY_EXTERNAL_REGISTRATION = false;
ENABLE_CAPTCHA = false;
REQUIRE_SIGNIN_VIEW = false;
DEFAULT_KEEP_EMAIL_PRIVATE = true;
DEFAULT_ALLOW_CREATE_ORGANIZATION = true;
DEFAULT_ENABLE_TIMETRACKING = false;
};
picture = {
DISABLE_GRAVATAR = true;
ENABLE_FEDERATED_AVATAR = false;
};
openid = {
ENABLE_OPENID_SIGNIN = false;
ENABLE_OPENID_SIGNUP = false;
};
};
};
services.postgresql = {
ensureDatabases = [ "gitea" ];
ensureUsers = [
{
name = "gitea";
ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES";
}
];
};
services.nginx.virtualHosts = {
"git.clerie.de" = {
enableACME = true;
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://localhost:3000";
};
};
};
};
}