nixos-config/common/networking.nix
Christoph Heiss f9ee1532ab
common: networking: fix IPv6(-only) support for Java
_Really_ not sure how anyone can take this piece of software even
remotely seriously.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-05-26 02:21:28 +02:00

21 lines
612 B
Nix

{ lib, ... }:
{
networking = {
useDHCP = lib.mkDefault true;
usePredictableInterfaceNames = true;
firewall = {
allowPing = true;
logRefusedConnections = false;
};
};
environment.variables = {
# https://bugs.openjdk.org/browse/JDK-8170568
# https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/doc-files/net-properties.html
# Apparently, Java does not seem to need to properly implement technology
# introduced 25(!) years ago. And people call this mess "enterprise-ready" ..
_JAVA_OPTIONS = "-Djava.net.preferIPv6Addresses=system";
};
}