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
This commit is contained in:
Florian Klink 2020-12-25 00:13:53 +01:00
parent 6180ee5243
commit c674a51382

View File

@ -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 = {