Merge #236: btcpayserver: sqlite -> postgresql

3cfb9d074b btcpayserver: sqlite -> postgresql (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 3cfb9d074b
  jonasnick:
    ACK 3cfb9d074b

Tree-SHA512: 5f9f38dfc6588082a3aeaf8f9fb66ef60a451a4fc7012b4cad6d7a13c14209839021b68ca2bd8c5ee43e154998ec2f496c8f9b3a3abae1a0f376d97eec5e563c
This commit is contained in:
Jonas Nick 2020-09-22 13:30:33 +00:00
commit de1a7346dc
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

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