aboutsummaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-02-04 21:58:15 +0100
committerLudovic Courtès <ludo@gnu.org>2015-02-04 22:49:35 +0100
commit996ed73948e92eb2005a2a282856753d707f452c (patch)
tree3dd45afdbbb22c01652cd2df9b7b61742440c6ab /gnu/system.scm
parentffd74de0c6de7435fcdc8e340efade032c365081 (diff)
downloadguix-996ed73948e92eb2005a2a282856753d707f452c.tar
guix-996ed73948e92eb2005a2a282856753d707f452c.tar.gz
system: Add bindings to configure libc's NSS.
* gnu/system/nss.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu.scm (%public-modules): Add it. * gnu/system.scm (<operating-system>)[name-service-switch]: New field. (etc-directory): Add #:nss parameter and honor it. (operating-system-etc-directory): Adjust call accordingly. * doc/guix.texi (operating-system Reference): Document 'name-service-switch'. (Name Service Switch): New section.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index b3c5cd8038..3fe78339b7 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -47,6 +47,7 @@
#:use-module (gnu services base)
#:use-module (gnu system grub)
#:use-module (gnu system shadow)
+ #:use-module (gnu system nss)
#:use-module (gnu system locale)
#:use-module (gnu system linux)
#:use-module (gnu system linux-initrd)
@@ -137,6 +138,8 @@
(default "en_US.utf8"))
(locale-definitions operating-system-locale-definitions ; list of <locale-definition>
(default %default-locale-definitions))
+ (name-service-switch operating-system-name-service-switch ; <name-service-switch>
+ (default %default-nss))
(services operating-system-user-services ; list of monadic services
(default %base-services))
@@ -408,7 +411,7 @@ settings for 'guix.el' to work out-of-the-box."
(skeletons '())
(pam-services '())
(profile "/run/current-system/profile")
- hosts-file
+ hosts-file nss
(sudoers ""))
"Return a derivation that builds the static part of the /etc directory."
(mlet* %store-monad
@@ -422,10 +425,8 @@ settings for 'guix.el' to work out-of-the-box."
/run/current-system/profile/bin/bash\n"))
(emacs (emacs-site-directory))
(issue (text-file "issue" issue))
-
- ;; For now, generate a basic config so that /etc/hosts is honored.
(nsswitch (text-file "nsswitch.conf"
- "hosts: files dns\n"))
+ (name-service-switch->string nss)))
;; Startup file for POSIX-compliant login shells, which set system-wide
;; environment variables.
@@ -518,6 +519,7 @@ export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"
#:skeletons skeletons
#:issue (operating-system-issue os)
#:locale (operating-system-locale os)
+ #:nss (operating-system-name-service-switch os)
#:timezone (operating-system-timezone os)
#:hosts-file /etc/hosts
#:sudoers (operating-system-sudoers os)