Inherit needed functions
This commit is contained in:
parent
055bb037a0
commit
d2c0c3074a
|
@ -5,6 +5,8 @@
|
|||
|
||||
with pkgs.lib;
|
||||
let
|
||||
inherit (pkgs.lib.ip) networkMinIp neworkMaxButOneIp ipv4OnNetwork;
|
||||
|
||||
range = base: top:
|
||||
assert base < top;
|
||||
let
|
||||
|
@ -12,8 +14,7 @@ let
|
|||
if base == top then [ ] else [ base ] ++ (rangeFun (base + 1) top);
|
||||
in rangeFun base top;
|
||||
|
||||
getNetworkHosts = network:
|
||||
selectAttrs (ip: _: pkgs.lib.ip.ipv4OnNetwork ip network);
|
||||
getNetworkHosts = network: selectAttrs (ip: _: ipv4OnNetwork ip network);
|
||||
|
||||
getLastIpComponent = ip: head (reverseList (splitString "." ip));
|
||||
|
||||
|
|
Loading…
Reference in New Issue