summaryrefslogtreecommitdiffstats
path: root/nixos/modules/system/boot/resolved.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-12-25 00:13:53 +0100
committerFlorian Klink <flokli@flokli.de>2020-12-25 13:45:25 +0100
commitc674a51382ce556f98c76f270275ecece3a4936a (patch)
tree76d1ee1fcf1b8f8c4a230b8a1bf820473f402942 /nixos/modules/system/boot/resolved.nix
parent6180ee52432fff9f1f54103673c56d3fbd245c02 (diff)
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
Diffstat (limited to 'nixos/modules/system/boot/resolved.nix')
-rw-r--r--nixos/modules/system/boot/resolved.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix
index 84bc9b78076c..7fe8f4dfb7e3 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 = {