enable gitea
This commit is contained in:
parent
2eafbfa1c0
commit
01906f483c
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./configuration.nix ./mailserver ./roundcube ./postgres ./wireguard ./nginx ./webshite ./tor ./i2pd ];
|
||||
imports = [ ./configuration.nix ./mailserver ./roundcube ./postgres ./wireguard ./nginx ./webshite ./tor ./i2pd ./gitea ];
|
||||
}
|
||||
|
17
mailserver/gitea/default.nix
Normal file
17
mailserver/gitea/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "idimitrov: Gitea";
|
||||
database = {
|
||||
type = "postgres";
|
||||
};
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.idimitrov.dev";
|
||||
ROOT_URL = "https://git.idimitrov.dev/";
|
||||
HTTP_PORT = 3001;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -32,7 +32,15 @@
|
||||
proxyPass = "http://127.0.0.1:3000";
|
||||
};
|
||||
};
|
||||
"git.idimitrov.dev" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3001";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,16 @@
|
||||
services = {
|
||||
postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "roundcube" ];
|
||||
ensureDatabases = [ "roundcube" "gitea" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "roundcube";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
{
|
||||
name = "gitea";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
{
|
||||
name = "root";
|
||||
ensureClauses = {
|
||||
@ -18,6 +22,12 @@
|
||||
};
|
||||
}
|
||||
];
|
||||
authentication = ''
|
||||
local gitea all ident map=gitea-users
|
||||
'';
|
||||
identMap = ''
|
||||
gitea-users gitea gitea
|
||||
'';
|
||||
initialScript = pkgs.writeText "init" ''
|
||||
GRANT ALL PRIVILEGES ON DATABASE roundcube TO roundcube;
|
||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO roundcube;
|
||||
|
Loading…
Reference in New Issue
Block a user