btcpayserver: sqlite -> postgresql

This commit is contained in:
nixbitcoin 2020-09-17 08:04:23 +00:00
parent a9c163c624
commit 3cfb9d074b
No known key found for this signature in database
GPG Key ID: DD11F9AD5308B3BA

View File

@ -93,6 +93,15 @@ in {
"d '${cfg.btcpayserver.dataDir}' 0770 ${cfg.btcpayserver.user} ${cfg.btcpayserver.group} - -" "d '${cfg.btcpayserver.dataDir}' 0770 ${cfg.btcpayserver.user} ${cfg.btcpayserver.group} - -"
]; ];
services.postgresql = {
enable = true;
ensureDatabases = [ "btcpaydb" ];
ensureUsers = [{
name = "${cfg.btcpayserver.user}";
ensurePermissions."DATABASE btcpaydb" = "ALL PRIVILEGES";
}];
};
systemd.services.nbxplorer = let systemd.services.nbxplorer = let
configFile = builtins.toFile "config" '' configFile = builtins.toFile "config" ''
network=mainnet network=mainnet
@ -130,6 +139,7 @@ in {
systemd.services.btcpayserver = let systemd.services.btcpayserver = let
configFile = builtins.toFile "config" ('' configFile = builtins.toFile "config" (''
network=mainnet network=mainnet
postgres=User ID=${cfg.btcpayserver.user};Host=/run/postgresql;Database=btcpaydb
socksendpoint=${cfg.tor.client.socksListenAddress} socksendpoint=${cfg.tor.client.socksListenAddress}
btcexplorerurl=http://${cfg.nbxplorer.bind}:24444/ btcexplorerurl=http://${cfg.nbxplorer.bind}:24444/
btcexplorercookiefile=${cfg.nbxplorer.dataDir}/Main/.cookie btcexplorercookiefile=${cfg.nbxplorer.dataDir}/Main/.cookie