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.
This commit is contained in:
parent
16686a9022
commit
7aec36830f
|
@ -251,38 +251,39 @@ GNU dmd (http://www.gnu.org/software/dmd/).
|
||||||
You can log in as 'guest' or 'root' with no password.
|
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.
|
;; TODO: Generate bashrc from packages' search-paths.
|
||||||
(bashrc (text-file "bashrc" (string-append "
|
(bashrc (text-file* "bashrc" "
|
||||||
export PS1='\\u@\\h\\$ '
|
export PS1='\\u@\\h\\$ '
|
||||||
|
|
||||||
export LC_ALL=\"" locale "\"
|
export LC_ALL=\"" locale "\"
|
||||||
export TZ=\"" timezone "\"
|
export TZ=\"" timezone "\"
|
||||||
export TZDIR=\"" tzdir "\"
|
export TZDIR=\"" tzdata "/share/zoneinfo\"
|
||||||
|
|
||||||
export PATH=$HOME/.guix-profile/bin:" profile "/bin:" profile "/sbin
|
export PATH=$HOME/.guix-profile/bin:" profile "/bin:" profile "/sbin
|
||||||
export CPATH=$HOME/.guix-profile/include:" profile "/include
|
export CPATH=$HOME/.guix-profile/include:" profile "/include
|
||||||
export LIBRARY_PATH=$HOME/.guix-profile/lib:" profile "/lib
|
export LIBRARY_PATH=$HOME/.guix-profile/lib:" profile "/lib
|
||||||
alias ls='ls -p --color'
|
alias ls='ls -p --color'
|
||||||
alias ll='ls -l'
|
alias ll='ls -l'
|
||||||
")))
|
"))
|
||||||
|
|
||||||
|
(tz-file (package-file tzdata
|
||||||
|
(string-append "share/zoneinfo/" timezone)))
|
||||||
(files -> `(("services" ,services)
|
(files -> `(("services" ,services)
|
||||||
("protocols" ,protocols)
|
("protocols" ,protocols)
|
||||||
("rpc" ,rpc)
|
("rpc" ,rpc)
|
||||||
("pam.d" ,(derivation->output-path pam.d))
|
("pam.d" ,(derivation->output-path pam.d))
|
||||||
("login.defs" ,login.defs)
|
("login.defs" ,login.defs)
|
||||||
("issue" ,issue)
|
("issue" ,issue)
|
||||||
("profile" ,bashrc)
|
("profile" ,(derivation->output-path bashrc))
|
||||||
|
("localtime" ,tz-file)
|
||||||
("passwd" ,passwd)
|
("passwd" ,passwd)
|
||||||
("shadow" ,shadow)
|
("shadow" ,shadow)
|
||||||
("group" ,group))))
|
("group" ,group))))
|
||||||
(file-union files
|
(file-union files
|
||||||
#:inputs `(("net" ,net-base)
|
#:inputs `(("net" ,net-base)
|
||||||
("pam.d" ,pam.d))
|
("pam.d" ,pam.d)
|
||||||
|
("bashrc" ,bashrc)
|
||||||
|
("tzdata" ,tzdata))
|
||||||
#:name "etc")))
|
#:name "etc")))
|
||||||
|
|
||||||
(define (operating-system-profile-derivation os)
|
(define (operating-system-profile-derivation os)
|
||||||
|
@ -329,7 +330,7 @@ alias ll='ls -l'
|
||||||
#:pam-services pam-services
|
#:pam-services pam-services
|
||||||
#:locale (operating-system-locale os)
|
#:locale (operating-system-locale os)
|
||||||
#:timezone (operating-system-timezone os)
|
#:timezone (operating-system-timezone os)
|
||||||
#:profile profile))
|
#:profile profile-drv))
|
||||||
(etc -> (derivation->output-path etc-drv))
|
(etc -> (derivation->output-path etc-drv))
|
||||||
(dmd-conf (dmd-configuration-file services etc))
|
(dmd-conf (dmd-configuration-file services etc))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue