diff options
| author | Karel Kočí <cynerd@email.cz> | 2025-12-01 11:22:23 +0100 |
|---|---|---|
| committer | Karel Kočí <cynerd@email.cz> | 2025-12-01 11:22:23 +0100 |
| commit | 54c6d3166c4c0f9464fbfd317eb03d164978277c (patch) | |
| tree | 43ac8194428e9b65b839733a3fd011bd28e9bc7b /lib/ipv4.nix | |
| parent | 3f01585f9de574ae6ec6ae774e0b6f1455ed11f7 (diff) | |
| download | nixos-personal-54c6d3166c4c0f9464fbfd317eb03d164978277c.tar.gz nixos-personal-54c6d3166c4c0f9464fbfd317eb03d164978277c.tar.bz2 nixos-personal-54c6d3166c4c0f9464fbfd317eb03d164978277c.zip | |
lib: remove with usage
Diffstat (limited to 'lib/ipv4.nix')
| -rw-r--r-- | lib/ipv4.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ipv4.nix b/lib/ipv4.nix index c843cb6..537525f 100644 --- a/lib/ipv4.nix +++ b/lib/ipv4.nix @@ -1,6 +1,7 @@ -lib: -with builtins; -with lib; rec { +lib: let + inherit (lib) int2bits toInt splitString flatten bits2int sublist genList zipListsWith; + inherit (lib.ipv4) ip2bits bits2ip netmaskBits int2ip ip2int prefix2ip; +in { # Converts string representation of IPv4 address to 32 bits ip2bits = ip: let perBits = map (x: int2bits 8 (toInt x)) (splitString "." ip); |
