about summary refs log tree commit diff
path: root/nixos/modules/config/networking.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-11-21 15:26:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2018-11-21 15:26:37 +0100
commit09cbfea2edd8a525f54d96a45c0edc2fe3c94e56 (patch)
treea4b5badbcd552bdf2f0df35b06397e15926ca3d7 /nixos/modules/config/networking.nix
parent5abdde2a1c835a45271a5aa3dec30d33237fb516 (diff)
downloadnixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar.gz
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar.bz2
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar.lz
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar.xz
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.tar.zst
nixlib-09cbfea2edd8a525f54d96a45c0edc2fe3c94e56.zip
Revert "resolvconf.conf: Remove forced NSCD service restart"
This reverts commit d8c16bc54ac0279597733db3bd4a5edaef6fa8c0. It
breaks nscd invalidation when the network configuration changes.
Diffstat (limited to 'nixos/modules/config/networking.nix')
-rw-r--r--nixos/modules/config/networking.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix
index e6b49d4c2194..25253cf02e1d 100644
--- a/nixos/modules/config/networking.nix
+++ b/nixos/modules/config/networking.nix
@@ -247,6 +247,10 @@ in
               # a collision with an apparently unrelated environment
               # variable with the same name exported by dhcpcd.
               interface_order='lo lo[0-9]*'
+            '' + optionalString config.services.nscd.enable ''
+              # Invalidate the nscd cache whenever resolv.conf is
+              # regenerated.
+              libc_restart='${pkgs.systemd}/bin/systemctl try-restart --no-block nscd.service 2> /dev/null'
             '' + optionalString (length resolvconfOptions > 0) ''
               # Options as described in resolv.conf(5)
               resolv_conf_options='${concatStringsSep " " resolvconfOptions}'