system: Simplify nsswitch binding.

* gnu/system.scm (operating-system-etc-service): Simplify nsswitch binding.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Bruno Victal 2023-03-10 20:21:21 +00:00 committed by Ludovic Courtès
parent 9fb8a480d5
commit 02be907a12
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1001,10 +1001,9 @@ (define* (operating-system-etc-service os)
(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