diff --git a/nixos/hosts/amd-ipv4-preference.nix b/nixos/hosts/amd-ipv4-preference.nix new file mode 100644 index 0000000000..b8182c337a --- /dev/null +++ b/nixos/hosts/amd-ipv4-preference.nix @@ -0,0 +1,23 @@ +_: +{ + # Temporary workaround for the home IPv6 uplink stalling on payload + # transfers (developing-today/code#1280): prefer IPv4 in getaddrinfo + # result sorting until the home IPv6 path is repaired. Remove with + # the issue. + networking.getaddrinfo = { + label = { + "::1/128" = 0; + "::/0" = 1; + "2002::/16" = 2; + "::/96" = 3; + "::ffff:0:0/96" = 4; + }; + precedence = { + "::1/128" = 50; + "::/0" = 40; + "2002::/16" = 30; + "::/96" = 20; + "::ffff:0:0/96" = 100; + }; + }; +} diff --git a/nixos/hosts/default.nix b/nixos/hosts/default.nix index 96c0736a84..17f86af539 100644 --- a/nixos/hosts/default.nix +++ b/nixos/hosts/default.nix @@ -57,6 +57,7 @@ in # KRdp remote desktop for this laptop (user service + package); # see the file for the one-time on-machine credential setup. ./amd-krdp.nix + ./amd-ipv4-preference.nix ]; }; # amd-server = host {