services: add helper fn setAllowedIPAddresses

Also use 'allowLocalIPAddresses' instead of 'allowTor' in bitcoind-import-banlist
which doesn't use Tor.
This commit is contained in:
Erik Arvstedt 2021-03-22 13:19:45 +01:00
parent cdf27d9d0c
commit 020433cec6
No known key found for this signature in database
GPG key ID: 33312B944DD97846
11 changed files with 22 additions and 45 deletions

View file

@ -100,9 +100,7 @@ in {
Restart = "on-failure";
RestartSec = "10s";
ReadWritePaths = cfg.dataDir;
} // (if cfg.enforceTor
then nbLib.allowTor
else nbLib.allowAnyIP);
} // (nbLib.allowedIPAddresses cfg.enforceTor);
};
};
}