SatoshiPay: set up PostgreSQL server
Alan Pearce alan@alanpearce.eu
Wed, 26 Aug 2020 14:07:27 +0200
1 files changed, 24 insertions(+), 0 deletions(-)
M system/settings/satoshipay.nix → system/settings/satoshipay.nix
@@ -61,6 +61,30 @@ OnActiveSec = "1 min"; }; }; + services.postgresql = { + enable = true; + ensureDatabases = ["satoshipay"]; + authentication = '' + # TYPE DATABASE USER ADDRESS METHOD + local all postgres trust + local all all md5 + ''; + ensureUsers = [ + { + name = "alan"; + ensurePermissions = { + "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES"; + }; + } + { + name = "satoshipay"; + ensurePermissions = { + "DATABASE satoshipay" = "ALL PRIVILEGES"; + }; + } + ]; + }; + nix.gc.dates = "12:30"; system.autoUpgrade.dates = "13:05";