From c674a51382ce556f98c76f270275ecece3a4936a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 25 Dec 2020 00:13:53 +0100 Subject: [PATCH] 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 --- nixos/modules/system/boot/resolved.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix index 84bc9b78076cf9d..7fe8f4dfb7e3a60 100644 --- a/nixos/modules/system/boot/resolved.nix +++ b/nixos/modules/system/boot/resolved.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, pkgs, lib, ... }: with lib; let @@ -150,6 +150,9 @@ in wantedBy = [ "multi-user.target" ]; aliases = [ "dbus-org.freedesktop.resolve1.service" ]; restartTriggers = [ config.environment.etc."systemd/resolved.conf".source ]; + # Upstream bug: https://github.com/systemd/systemd/issues/18078 + # systemd-resolved without libidn2 is broken + environment.LD_LIBRARY_PATH = "${lib.getLib pkgs.libidn2}/lib"; }; environment.etc = {