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:
parent
cdf27d9d0c
commit
020433cec6
11 changed files with 22 additions and 45 deletions
|
|
@ -357,9 +357,7 @@ in {
|
|||
Restart = "on-failure";
|
||||
UMask = mkIf cfg.dataDirReadableByGroup "0027";
|
||||
ReadWritePaths = cfg.dataDir;
|
||||
} // (if cfg.enforceTor
|
||||
then nbLib.allowTor
|
||||
else nbLib.allowAnyIP)
|
||||
} // nbLib.allowedIPAddresses cfg.enforceTor
|
||||
// optionalAttrs (cfg.zmqpubrawblock != null || cfg.zmqpubrawtx != null) nbLib.allowAnyProtocol;
|
||||
};
|
||||
|
||||
|
|
@ -385,7 +383,7 @@ in {
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ReadWritePaths = cfg.dataDir;
|
||||
} // nbLib.allowTor;
|
||||
} // nbLib.allowLocalIPAddresses;
|
||||
};
|
||||
|
||||
users.users.${cfg.user}.group = cfg.group;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue