git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/systemd: provide libidn2 for systemd-resolved

systemd started using dlopen() for some of their "optional" dependencies. Apparently, `libidn2` isn't so optional, and systemd-resolved doesn't work without libidn2 present, breaking DNS resolution. Fixes https://github.com/NixOS/nixpkgs/issues/107537 Upstream bug: https://github.com/systemd/systemd/issues/18078

commitc674a51382ce556f98c76f270275ecece3a4936a authorFlorian Klink <flokli@flokli.de> dateFri 25 Dec 2020, 00:13 (6 years ago) parent6180ee5
1 file changed+4−1
nixos/modules/system/boot/resolved.nix+4−1
nixos/modules/system/boot/resolved.nix+4−1
@@ -1,4 +1,4 @@
1−{ config, lib, ... }:
1+{ config, pkgs, lib, ... }:
22
33with lib;
44let
@@ -150,6 +150,9 @@ in
150150 wantedBy = [ "multi-user.target" ];
151151 aliases = [ "dbus-org.freedesktop.resolve1.service" ];
152152 restartTriggers = [ config.environment.etc."systemd/resolved.conf".source ];
153+ # Upstream bug: https://github.com/systemd/systemd/issues/18078
154+ # systemd-resolved without libidn2 is broken
155+ environment.LD_LIBRARY_PATH = "${lib.getLib pkgs.libidn2}/lib";
153156 };
154157
155158 environment.etc = {