summary refs log tree commit diff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-03-10 20:21:21 +0000
committerLudovic Courtès <ludo@gnu.org>2023-03-13 15:08:32 +0100
commit02be907a12dc291b02f6e895ca15f2fb20037185 (patch)
tree75da5f55b2058b57a71482d83ebb11572c0707c4 /gnu/system.scm
parent9fb8a480d5aec9186908e92ad18b31455f4aab6b (diff)
downloadguix-02be907a12dc291b02f6e895ca15f2fb20037185.tar.gz
system: Simplify nsswitch binding.
* gnu/system.scm (operating-system-etc-service): Simplify nsswitch binding.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index bb26d7c9a5..2947d1321f 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1001,10 +1001,9 @@ the /etc directory."
 
          (hurd       (operating-system-hurd os))
          (issue      (plain-file "issue" (operating-system-issue os)))
-         (nsswitch   (operating-system-name-service-switch os))
-         (nsswitch   (and nsswitch
-                          (plain-file "nsswitch.conf"
-                                      (name-service-switch->string nsswitch))))
+         (nsswitch   (and=> (operating-system-name-service-switch os)
+                            (compose (cut plain-file "nsswitch.conf" <>)
+                                     name-service-switch->string)))
          (sudoers    (operating-system-sudoers-file os))
 
         ;; Startup file for POSIX-compliant login shells, which set system-wide