feat(secrets/git): adding the gitea configuration
This commit is contained in:
parent
f3a0b5f709
commit
8a0b4ce76d
1 changed files with 49 additions and 0 deletions
49
services/self_host/git.nix
Normal file
49
services/self_host/git.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
giteaDomain = "git.enium.eu";
|
||||
in
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "Enium Git";
|
||||
user = "gitea";
|
||||
group = "gitea";
|
||||
database.type = "sqlite3";
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = giteaDomain;
|
||||
ROOT_URL = "https://${giteaDomain}/";
|
||||
SSH_PORT = 42131;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
HTTP_PORT = 3042;
|
||||
DISABLE_REGISTRATION = true;
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
SHOW_REGISTRATION_BUTTON = false;
|
||||
DISABLE_REGULAR_LOGIN = true;
|
||||
};
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
};
|
||||
|
||||
web = {
|
||||
DISABLE_LOCAL_LOGIN = true;
|
||||
};
|
||||
|
||||
oauth2_client = {
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${giteaDomain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3042";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue