Merge #236: btcpayserver: sqlite -> postgresql
3cfb9d074b
btcpayserver: sqlite -> postgresql (nixbitcoin) Pull request description: ACKs for top commit: erikarvstedt: ACK3cfb9d074b
jonasnick: ACK3cfb9d074b
Tree-SHA512: 5f9f38dfc6588082a3aeaf8f9fb66ef60a451a4fc7012b4cad6d7a13c14209839021b68ca2bd8c5ee43e154998ec2f496c8f9b3a3abae1a0f376d97eec5e563c
This commit is contained in:
commit
de1a7346dc
@ -93,6 +93,15 @@ in {
|
||||
"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
|
||||
configFile = builtins.toFile "config" ''
|
||||
network=mainnet
|
||||
@ -130,6 +139,7 @@ in {
|
||||
systemd.services.btcpayserver = let
|
||||
configFile = builtins.toFile "config" (''
|
||||
network=mainnet
|
||||
postgres=User ID=${cfg.btcpayserver.user};Host=/run/postgresql;Database=btcpaydb
|
||||
socksendpoint=${cfg.tor.client.socksListenAddress}
|
||||
btcexplorerurl=http://${cfg.nbxplorer.bind}:24444/
|
||||
btcexplorercookiefile=${cfg.nbxplorer.dataDir}/Main/.cookie
|
||||
|
Loading…
Reference in New Issue
Block a user