Set up Gitea
This commit is contained in:
@@ -62,6 +62,9 @@
|
||||
locations."/syncthing/" = {
|
||||
proxyPass = "http://localhost:8384/";
|
||||
};
|
||||
locations."/gitea/" = {
|
||||
proxyPass = "http://localhost:3000/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -81,7 +84,27 @@
|
||||
};
|
||||
|
||||
# Enable PostgreSQL with daily backup
|
||||
services.postgresql.enable = true;
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_11;
|
||||
ensureDatabases = [ "gitea" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "gitea";
|
||||
ensurePermissions = {"DATABASE gitea" = "ALL PRIVILEGES";};
|
||||
}
|
||||
];
|
||||
authentication = lib.mkForce ''
|
||||
# Generated file; do not edit!
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
'';
|
||||
identMap = ''
|
||||
gitea-users gitea gitea
|
||||
'';
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user