successfull interplay between gitea and postgres

This commit is contained in:
Rachel Lambda Samuelsson 2024-05-24 22:54:44 +02:00
parent 3f21fc215d
commit 70c96d504d
3 changed files with 7 additions and 6 deletions

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/cy1mab4p2g1zf38bcdpb3ix034wxs8a8-nixos-vm

View File

@ -10,6 +10,7 @@
port = 3306; port = 3306;
name = "gitea"; name = "gitea";
user = "gitea"; user = "gitea";
createDatabase = false;
passwordFile = ../secrets/gitea_postgres_pass; passwordFile = ../secrets/gitea_postgres_pass;
}; };
settings.server = { settings.server = {

View File

@ -6,12 +6,11 @@
enableTCPIP = true; enableTCPIP = true;
port = 3306; port = 3306;
ensureDatabases = [ "gitea" ]; ensureDatabases = [ "gitea" ];
initialScript = pkgs.writeText "backend-initScript" '' ensureUsers = [{
CREATE USER gitea WITH LOGIN PASSWORD '${pkgs.lib.strings.fileContents ../secrets/gitea_postgres_pass}' CREATEDB; name = "gitea";
CREATE DATABASE gitea; ensureDBOwnership = true;
GRANT ALL PRIVILEGES ON DATABASE gitea TO gitea; }];
''; authentication = ''
authentication = pkgs.lib.mkOverride 10 ''
host all all 10.10.0.0/16 trust host all all 10.10.0.0/16 trust
''; '';
}; };