aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/nss.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-06-10 17:50:27 -0400
committerMark H Weaver <mhw@netris.org>2015-06-10 17:50:27 -0400
commit14928016556300a6763334d4279c3d117902caaf (patch)
treed0dc262b14164b82f97dd6e896ca9e93a1fabeea /gnu/system/nss.scm
parent1511e0235525358abb52cf62abeb9457605b5093 (diff)
parent57cd353d87d6e9e6e882327be70b4d7b5ce863ba (diff)
downloadguix-14928016556300a6763334d4279c3d117902caaf.tar
guix-14928016556300a6763334d4279c3d117902caaf.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system/nss.scm')
-rw-r--r--gnu/system/nss.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/system/nss.scm b/gnu/system/nss.scm
index ec2d2517e7..f4d2855289 100644
--- a/gnu/system/nss.scm
+++ b/gnu/system/nss.scm
@@ -29,6 +29,8 @@
lookup-specification
%default-nss
+ %mdns-host-lookup-nss
+
%files
%compat
%dns
@@ -148,6 +150,27 @@
;; Default NSS configuration.
(name-service-switch))
+(define %mdns-host-lookup-nss
+ (name-service-switch
+ (hosts (list %files ;first, check /etc/hosts
+
+ ;; If the above did not succeed, try with 'mdns_minimal'.
+ (name-service
+ (name "mdns_minimal")
+
+ ;; 'mdns_minimal' is authoritative for '.local'. When it
+ ;; returns "not found", no need to try the next methods.
+ (reaction (lookup-specification
+ (not-found => return))))
+
+ ;; Then fall back to DNS.
+ (name-service
+ (name "dns"))
+
+ ;; Finally, try with the "full" 'mdns'.
+ (name-service
+ (name "mdns"))))))
+
;;;
;;; Serialization.