netns-isolation: avoid creating service files for disabled services
Only set the `serviceConfig` option when the service is enabled. Otherwise a service file is created.
This commit is contained in:
parent
017e08ca10
commit
c6fe017aeb
@ -332,14 +332,16 @@ in {
|
|||||||
payjoinAddress = netns.joinmarket.address;
|
payjoinAddress = netns.joinmarket.address;
|
||||||
cliExec = mkCliExec "joinmarket";
|
cliExec = mkCliExec "joinmarket";
|
||||||
};
|
};
|
||||||
systemd.services.joinmarket-yieldgenerator.serviceConfig.NetworkNamespacePath = "/var/run/netns/nb-joinmarket";
|
systemd.services.joinmarket-yieldgenerator = mkIf config.services.joinmarket.yieldgenerator.enable {
|
||||||
|
serviceConfig.NetworkNamespacePath = "/var/run/netns/nb-joinmarket";
|
||||||
|
};
|
||||||
|
|
||||||
services.joinmarket-ob-watcher.address = netns.joinmarket-ob-watcher.address;
|
services.joinmarket-ob-watcher.address = netns.joinmarket-ob-watcher.address;
|
||||||
|
|
||||||
services.lightning-pool.rpcAddress = netns.lightning-pool.address;
|
services.lightning-pool.rpcAddress = netns.lightning-pool.address;
|
||||||
|
|
||||||
services.rtl.address = netns.rtl.address;
|
services.rtl.address = netns.rtl.address;
|
||||||
systemd.services.cl-rest = {
|
systemd.services.cl-rest = mkIf config.services.rtl.cl-rest.enable {
|
||||||
serviceConfig.NetworkNamespacePath = "/var/run/netns/nb-rtl";
|
serviceConfig.NetworkNamespacePath = "/var/run/netns/nb-rtl";
|
||||||
requires = [ "netns-rtl.service" ] ;
|
requires = [ "netns-rtl.service" ] ;
|
||||||
after = [ "netns-rtl.service" ];
|
after = [ "netns-rtl.service" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user