netns: move webindex config for modules-only usage

webindex is only available in secure-node.
This commit is contained in:
Erik Arvstedt 2020-08-21 22:36:02 +02:00
parent 121301337b
commit 32e70a7516
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 10 additions and 3 deletions

View File

@ -83,6 +83,12 @@ in {
The user's group is also authorized. The user's group is also authorized.
''; '';
}; };
netns = mkOption {
default = netns;
readOnly = true;
description = "Exposes netns parameters.";
};
}; };
config = mkIf cfg.enable (mkMerge [ config = mkIf cfg.enable (mkMerge [
@ -286,8 +292,6 @@ in {
host = netns.nanopos.address; host = netns.nanopos.address;
}; };
services.nix-bitcoin-webindex.host = netns.nginx.address;
services.lightning-loop.cliExec = mkCliExec "lightning-loop"; services.lightning-loop.cliExec = mkCliExec "lightning-loop";
} }
]); ]);

View File

@ -41,7 +41,10 @@ in {
}; };
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = "localhost"; default = if config.nix-bitcoin.netns-isolation.enable then
config.nix-bitcoin.netns-isolation.netns.nginx.address
else
"localhost";
description = "HTTP server listen address."; description = "HTTP server listen address.";
}; };
enforceTor = nix-bitcoin-services.enforceTor; enforceTor = nix-bitcoin-services.enforceTor;