diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-26 15:03:18 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-06-05 17:25:16 +0200 |
commit | 10a409f984e9bce9cf15c1aaf3771a5043afc305 (patch) | |
tree | 0c8b07784e7632a5c9b53ef3ddedb5bdbae067ab /host/Spacebar-postgres/configuration.nix | |
parent | Work on spacebar container (diff) | |
download | Spacebar-Open-Infrastructure-10a409f984e9bce9cf15c1aaf3771a5043afc305.tar.xz |
Postgres, maybe?
Diffstat (limited to 'host/Spacebar-postgres/configuration.nix')
-rwxr-xr-x | host/Spacebar-postgres/configuration.nix | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/host/Spacebar-postgres/configuration.nix b/host/Spacebar-postgres/configuration.nix deleted file mode 100755 index b40fd3a..0000000 --- a/host/Spacebar-postgres/configuration.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = - [ - ../../modules/base.nix - ]; - - networking = { - hostName = "Spacebar-postgres"; - interfaces.ens18.ipv4.addresses = [ { - address = "192.168.1.4"; - prefixLength = 24; - } ]; - interfaces.ens19.ipv4.addresses = [ { - address = "10.10.11.4"; - prefixLength = 16; - } ]; - }; - - systemd.tmpfiles.rules = [ "d /data/pg 0750 postgres postgres" ]; - - services.postgresql = { - enable = true; - package = pkgs.postgresql_14; - enableTCPIP = true; - authentication = pkgs.lib.mkOverride 10 '' - # TYPE, DATABASE, USER, ADDRESS, METHOD - local all all trust - host all all 127.0.0.1/32 trust - host all all ::1/128 trust - host matrix-synapse-spacebar-chat matrix-synapse-spacebar-chat 192.168.1.5/32 trust - host all all 0.0.0.0/0 md5 - ''; - initialScript = pkgs.writeText "backend-initScript" '' - CREATE ROLE matrix-synapse-spacebar-chat WITH LOGIN PASSWORD '${pkgs.postgresql_14}' CREATEDB; - CREATE DATABASE matrix-synapse-spacebar-chat; - GRANT ALL PRIVILEGES ON DATABASE matrix-synapse-spacebar-chat TO matrix-synapse-spacebar-chat; - ''; - dataDir = "/data/pg"; - settings = { - "max_connections" = "100"; - "shared_buffers" = "128MB"; - "max_wal_size" = "1GB"; - "min_wal_size" = "80MB"; - }; - }; - - system.stateVersion = "22.11"; # DO NOT EDIT! -} - |