summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-02-05 22:22:51 +0100
committerLudovic Courtès <ludo@gnu.org>2014-02-05 22:22:51 +0100
commit7aec36830faf5de613ca2ae64b1845545ad12da9 (patch)
tree696a59e7d62e0ced741e39a4c8a607c64c8a0c36 /gnu
parent16686a902276c827455d78860dd62aaa68922cd2 (diff)
downloadguix-7aec36830faf5de613ca2ae64b1845545ad12da9.tar.gz
gnu: system: Build /etc/localtime.
* gnu/system.scm (etc-directory)[bashrc]: Use 'text-file*' instead of
  'text-file'.  Adjust users accordingly.
  [files]: Add the /etc/localtime file for TIMEZONE.
  Add TZDATA to the 'file-union' inputs.
  (operating-system-derivation): Pass 'etc-directory' PROFILE-DRV
  instead of PROFILE.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system.scm21
1 files changed, 11 insertions, 10 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 514e67ab9a..e06b8103a5 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -251,38 +251,39 @@ GNU dmd (http://www.gnu.org/software/dmd/).
 You can log in as 'guest' or 'root' with no password.
 "))
 
-       ;; Assume TZDATA is installed---e.g., as part of the system packages.
-       ;; Users can choose not to have it.
-       (tzdir      (package-file tzdata "share/zoneinfo"))
-
        ;; TODO: Generate bashrc from packages' search-paths.
-       (bashrc    (text-file "bashrc" (string-append "
+       (bashrc    (text-file* "bashrc"  "
 export PS1='\\u@\\h\\$ '
 
 export LC_ALL=\"" locale "\"
 export TZ=\"" timezone "\"
-export TZDIR=\"" tzdir "\"
+export TZDIR=\"" tzdata "/share/zoneinfo\"
 
 export PATH=$HOME/.guix-profile/bin:" profile "/bin:" profile "/sbin
 export CPATH=$HOME/.guix-profile/include:" profile "/include
 export LIBRARY_PATH=$HOME/.guix-profile/lib:" profile "/lib
 alias ls='ls -p --color'
 alias ll='ls -l'
-")))
+"))
 
+       (tz-file  (package-file tzdata
+                               (string-append "share/zoneinfo/" timezone)))
        (files -> `(("services" ,services)
                    ("protocols" ,protocols)
                    ("rpc" ,rpc)
                    ("pam.d" ,(derivation->output-path pam.d))
                    ("login.defs" ,login.defs)
                    ("issue" ,issue)
-                   ("profile" ,bashrc)
+                   ("profile" ,(derivation->output-path bashrc))
+                   ("localtime" ,tz-file)
                    ("passwd" ,passwd)
                    ("shadow" ,shadow)
                    ("group" ,group))))
     (file-union files
                 #:inputs `(("net" ,net-base)
-                           ("pam.d" ,pam.d))
+                           ("pam.d" ,pam.d)
+                           ("bashrc" ,bashrc)
+                           ("tzdata" ,tzdata))
                 #:name "etc")))
 
 (define (operating-system-profile-derivation os)
@@ -329,7 +330,7 @@ alias ll='ls -l'
                                    #:pam-services pam-services
                                    #:locale (operating-system-locale os)
                                    #:timezone (operating-system-timezone os)
-                                   #:profile profile))
+                                   #:profile profile-drv))
        (etc     ->  (derivation->output-path etc-drv))
        (dmd-conf  (dmd-configuration-file services etc))