diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-12-26 19:10:38 +0100 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-12-26 19:10:53 +0100 |
commit | e3a3a1e4d3882a81dc7d682a639e337bb5dc8c1a (patch) | |
tree | 3e7bf087e49e67be407167cbb848584501756cf7 | |
parent | Update build.sh (diff) | |
download | Rory-Open-Architecture-e3a3a1e4d3882a81dc7d682a639e337bb5dc8c1a.tar.xz |
Postgres setup
Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
-rw-r--r-- | host/Rory-postgres/configuration.nix | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/host/Rory-postgres/configuration.nix b/host/Rory-postgres/configuration.nix index d224e78..7123a57 100644 --- a/host/Rory-postgres/configuration.nix +++ b/host/Rory-postgres/configuration.nix @@ -14,8 +14,29 @@ } ]; }; - environment.systemPackages = with pkgs; [ - ]; + # environment.systemPackages = with pkgs; [ + # postgresql + # ]; + + 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 discordbots discordbots 192.168.1.1/24 trust + host all all 0.0.0.0 md5 + ''; + # initialScript = pkgs.writeText "backend-initScript" '' + # CREATE ROLE nixcloud WITH LOGIN PASSWORD 'nixcloud' CREATEDB; + # CREATE DATABASE nixcloud; + # GRANT ALL PRIVILEGES ON DATABASE nixcloud TO nixcloud; + # ''; + dataDir = "/data"; + }; system.stateVersion = "22.11"; # DO NOT EDIT! } |