📦 add gitea

This commit is contained in:
2021-10-13 21:11:36 -04:00
parent 66d78f6d68
commit beeb532c6c
4 changed files with 65 additions and 0 deletions

41
modules/gitea/default.nix Normal file
View File

@ -0,0 +1,41 @@
{ config, lib, pkgs, ... }:
let cfg = config.services.gitea;
in {
users.users.git = {
description = "Gitea Service";
home = cfg.stateDir;
useDefaultShell = true;
group = "git";
isSystemUser = true;
};
users.groups.git = { };
services.gitea = {
enable = true;
user = "git";
domain = "walkah.dev";
appName = "walkah forge";
rootUrl = "https://walkah.dev/";
httpAddress = "0.0.0.0";
httpPort = 8003;
log.level = "Error";
lfs.enable = true;
disableRegistration = true;
cookieSecure = true;
settings = {
other.SHOW_FOOTER_VERSION = false;
repository.DEFAULT_BRANCH = "main";
server.SSH_DOMAIN = "git.walkah.dev";
};
dump.enable = false;
database = {
type = "postgres";
user = "git";
};
};
}

17
modules/gitea/nginx.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
services.nginx = {
enable = true;
virtualHosts = {
"walkah.dev" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://plato:8003";
proxyWebsockets = true;
};
};
};
};
}