Merge #291: btcpayserver: add rootpath option

edc657d138 btcpayserver: add rootpath option (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK edc657d138

Tree-SHA512: d96e2fd58c46fe1e70c239c37bf97ac1431a1b83068728bbbbf69a91deb63e2a78404ca0b9a53315c457b87f86b3901c03d76befcf9db4e260c597f2706bba8c
This commit is contained in:
Jonas Nick 2020-12-30 19:05:29 +00:00
commit ef28768221
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -84,6 +84,12 @@ in {
default = null; default = null;
description = "The lightning node implementation to use."; description = "The lightning node implementation to use.";
}; };
rootpath = mkOption {
type = types.nullOr types.str;
default = null;
example = "btcpayserver";
description = "The prefix for root-relative btcpayserver URLs.";
};
enforceTor = nix-bitcoin-services.enforceTor; enforceTor = nix-bitcoin-services.enforceTor;
}; };
}; };
@ -150,6 +156,7 @@ in {
btcexplorerurl=http://${cfg.nbxplorer.bind}:${toString cfg.nbxplorer.port}/ btcexplorerurl=http://${cfg.nbxplorer.bind}:${toString cfg.nbxplorer.port}/
btcexplorercookiefile=${cfg.nbxplorer.dataDir}/${config.services.bitcoind.makeNetworkName "Main" "RegTest"}/.cookie btcexplorercookiefile=${cfg.nbxplorer.dataDir}/${config.services.bitcoind.makeNetworkName "Main" "RegTest"}/.cookie
bind=${cfg.btcpayserver.bind} bind=${cfg.btcpayserver.bind}
${optionalString (cfg.btcpayserver.rootpath != null) "rootpath=${cfg.btcpayserver.rootpath}"}
port=${toString cfg.btcpayserver.port} port=${toString cfg.btcpayserver.port}
'' + optionalString (cfg.btcpayserver.lightningBackend == "clightning") '' '' + optionalString (cfg.btcpayserver.lightningBackend == "clightning") ''
btclightning=type=clightning;server=unix:///${cfg.clightning.dataDir}/bitcoin/lightning-rpc btclightning=type=clightning;server=unix:///${cfg.clightning.dataDir}/bitcoin/lightning-rpc