clightning: add bindport option
This commit is contained in:
parent
b6179639fe
commit
d99ccc8445
@ -50,6 +50,11 @@ in {
|
|||||||
default = null;
|
default = null;
|
||||||
description = "Set an IP address or UNIX domain socket to listen to";
|
description = "Set an IP address or UNIX domain socket to listen to";
|
||||||
};
|
};
|
||||||
|
bindport = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 9735;
|
||||||
|
description = "Set a Port to listen to locally";
|
||||||
|
};
|
||||||
announce-tor = mkOption {
|
announce-tor = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -227,7 +227,7 @@ in {
|
|||||||
# clightning: Custom netns configs
|
# clightning: Custom netns configs
|
||||||
services.clightning = mkIf config.services.clightning.enable {
|
services.clightning = mkIf config.services.clightning.enable {
|
||||||
bitcoin-rpcconnect = netns.bitcoind.address;
|
bitcoin-rpcconnect = netns.bitcoind.address;
|
||||||
bind-addr = "${netns.clightning.address}:${toString config.services.clightning.onionport}";
|
bind-addr = "${netns.clightning.address}:${toString config.services.clightning.bindport}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# lnd: Custom netns configs
|
# lnd: Custom netns configs
|
||||||
@ -307,7 +307,7 @@ in {
|
|||||||
# Custom netns config option values if netns-isolation not enabled
|
# Custom netns config option values if netns-isolation not enabled
|
||||||
(mkIf (!cfg.enable) {
|
(mkIf (!cfg.enable) {
|
||||||
# clightning
|
# clightning
|
||||||
services.clightning.bind-addr = "127.0.0.1:${toString config.services.clightning.onionport}";
|
services.clightning.bind-addr = "127.0.0.1:${toString config.services.clightning.bindport}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ in {
|
|||||||
enforceTor = true;
|
enforceTor = true;
|
||||||
always-use-proxy = true;
|
always-use-proxy = true;
|
||||||
};
|
};
|
||||||
services.tor.hiddenServices.clightning = mkIf cfg.clightning.enable (mkHiddenService { port = cfg.clightning.onionport; toHost = (builtins.head (builtins.split ":" cfg.clightning.bind-addr)); });
|
services.tor.hiddenServices.clightning = mkIf cfg.clightning.enable (mkHiddenService { port = cfg.clightning.onionport; toHost = (builtins.head (builtins.split ":" cfg.clightning.bind-addr)); toPort = cfg.clightning.bindport; });
|
||||||
|
|
||||||
# lnd
|
# lnd
|
||||||
services.lnd = {
|
services.lnd = {
|
||||||
|
Loading…
Reference in New Issue
Block a user