minor improvements
- README: add matrix room - examples/configuration.nix: explain why bitcoind is enabled by default - btcpayserver: group lnd service settings - clightning: Use public onion port only when the onion service is public This allows users to enable the onion service while announcing a non-onion public address. - netns-isolation: move `readOnly` attr to the top - tests: use mkDefault to allow for easier overriding - tests/btcpayserver: test web server response
This commit is contained in:
@@ -119,17 +119,17 @@ in {
|
||||
listenWhitelisted = true;
|
||||
};
|
||||
services.clightning.enable = mkIf (cfg.btcpayserver.lightningBackend == "clightning") true;
|
||||
services.lnd.enable = mkIf (cfg.btcpayserver.lightningBackend == "lnd") true;
|
||||
services.lnd = mkIf (cfg.btcpayserver.lightningBackend == "lnd") {
|
||||
enable = true;
|
||||
macaroons.btcpayserver = {
|
||||
inherit (cfg.btcpayserver) user;
|
||||
permissions = ''{"entity":"info","action":"read"},{"entity":"onchain","action":"read"},{"entity":"offchain","action":"read"},{"entity":"address","action":"read"},{"entity":"message","action":"read"},{"entity":"peers","action":"read"},{"entity":"signer","action":"read"},{"entity":"invoices","action":"read"},{"entity":"invoices","action":"write"},{"entity":"address","action":"write"}'';
|
||||
};
|
||||
};
|
||||
services.liquidd = mkIf cfg.btcpayserver.lbtc {
|
||||
enable = true;
|
||||
listenWhitelisted = true;
|
||||
};
|
||||
|
||||
services.lnd.macaroons.btcpayserver = mkIf (cfg.btcpayserver.lightningBackend == "lnd") {
|
||||
inherit (cfg.btcpayserver) user;
|
||||
permissions = ''{"entity":"info","action":"read"},{"entity":"onchain","action":"read"},{"entity":"offchain","action":"read"},{"entity":"address","action":"read"},{"entity":"message","action":"read"},{"entity":"peers","action":"read"},{"entity":"signer","action":"read"},{"entity":"invoices","action":"read"},{"entity":"invoices","action":"write"},{"entity":"address","action":"write"}'';
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "btcpaydb" ];
|
||||
|
||||
@@ -91,8 +91,10 @@ let
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
# If the clightning onion service is enabled, use the onion port as the public port
|
||||
publicPort = if config.nix-bitcoin.onionServices.clightning.enable or false then
|
||||
# If a public clightning onion service is enabled, use the onion port as the public port
|
||||
publicPort = if (config.nix-bitcoin.onionServices.clightning.enable or false)
|
||||
&& config.nix-bitcoin.onionServices.clightning.public
|
||||
then
|
||||
(builtins.elemAt config.services.tor.relay.onionServices.clightning.map 0).port
|
||||
else
|
||||
cfg.port;
|
||||
|
||||
@@ -43,14 +43,14 @@ let
|
||||
};
|
||||
|
||||
netns = mkOption {
|
||||
default = netns;
|
||||
readOnly = true;
|
||||
default = netns;
|
||||
description = "Exposes netns parameters.";
|
||||
};
|
||||
|
||||
bridgeIp = mkOption {
|
||||
default = bridgeIp;
|
||||
readOnly = true;
|
||||
default = bridgeIp;
|
||||
description = "IP of the netns bridge interface.";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user