diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-01-02 22:03:55 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-01-02 22:03:55 -0600 |
| commit | e7f2096f8d193c20740d481fdf29151f8da08c5a (patch) | |
| tree | ae3a1202b52cef4476e3d7d6ac3485586137a1be | |
| parent | 083c1d226a03fb84fb1e717adc1581049df689cf (diff) | |
sys/net: switch gate0 to public subnet 2a03:3b40:fe:888::/64
Diffstat (limited to '')
| -rw-r--r-- | sys/net/options.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/net/options.nix b/sys/net/options.nix index 292989a..a0d29d5 100644 --- a/sys/net/options.nix +++ b/sys/net/options.nix @@ -81,9 +81,17 @@ with lib; { config = { address = - if v6config.bits != 0 - then "${v6config.prefix}::${config.suffix}" - else config.suffix; + let + hextets = fragment: length (splitString ":" fragment); + separator = if doubleColon then "::" else ":"; + doubleColon = hextets v6config.prefix + hextets config.suffix < 8; + + joined = + if v6config.bits != 0 + then "${v6config.prefix}${separator}${config.suffix}" + else config.suffix; + in + joined; cidr = "${config.address}/${toString v6config.bits}"; single = "${config.address}/128"; |
