system: Add 'issue' field.

* gnu/system.scm (<operating-system>)[issue]: New field.
  (%default-issue): New variable.
  (etc-directory): Add #:issue parameter and honor it.
  (operating-system-etc-directory): Adjust call accordingly.
* build-aux/hydra/demo-os.scm: Add 'issue' field.
This commit is contained in:
Ludovic Courtès 2014-05-31 22:01:05 +02:00
parent 52322163ac
commit 548d4c1395
2 changed files with 24 additions and 9 deletions

View File

@ -41,6 +41,7 @@
(host-name "gnu") (host-name "gnu")
(timezone "Europe/Paris") (timezone "Europe/Paris")
(locale "en_US.UTF-8") (locale "en_US.UTF-8")
(bootloader (grub-configuration (bootloader (grub-configuration
(device "/dev/sda"))) (device "/dev/sda")))
(file-systems (file-systems
@ -52,6 +53,7 @@
(type "dummy")) (type "dummy"))
;; %fuse-control-file-system ; needs fuse.ko ;; %fuse-control-file-system ; needs fuse.ko
%binary-format-file-system)) %binary-format-file-system))
(users (list (user-account (users (list (user-account
(name "guest") (name "guest")
(group "wheel") (group "wheel")
@ -67,6 +69,17 @@
(name "users") (name "users")
(id 100) (id 100)
(members '("guest"))))) (members '("guest")))))
(issue "
This is an alpha preview of the GNU system. Welcome.
This image features the GNU Guix package manager, which was used to
build it (http://www.gnu.org/software/guix/). The init system is
GNU dmd (http://www.gnu.org/software/dmd/).
You can log in as 'guest' or 'root' with no password.
")
(services (cons* (slim-service #:auto-login? #t (services (cons* (slim-service #:auto-login? #t
#:default-user "guest") #:default-user "guest")

View File

@ -51,6 +51,7 @@
operating-system-initrd operating-system-initrd
operating-system-users operating-system-users
operating-system-groups operating-system-groups
operating-system-issue
operating-system-packages operating-system-packages
operating-system-timezone operating-system-timezone
operating-system-locale operating-system-locale
@ -92,6 +93,8 @@
(skeletons operating-system-skeletons ; list of name/monadic value (skeletons operating-system-skeletons ; list of name/monadic value
(default (default-skeletons))) (default (default-skeletons)))
(issue operating-system-issue ; string
(default %default-issue))
(packages operating-system-packages ; list of (PACKAGE OUTPUT...) (packages operating-system-packages ; list of (PACKAGE OUTPUT...)
(default (list coreutils ; or just PACKAGE (default (list coreutils ; or just PACKAGE
@ -211,8 +214,14 @@ explicitly appear in OS."
;;; /etc. ;;; /etc.
;;; ;;;
(define %default-issue
;; Default contents for /etc/issue.
"
This is the GNU system. Welcome.\n")
(define* (etc-directory #:key (define* (etc-directory #:key
(locale "C") (timezone "Europe/Paris") (locale "C") (timezone "Europe/Paris")
(issue "Hello!\n")
(skeletons '()) (skeletons '())
(pam-services '()) (pam-services '())
(profile "/run/current-system/profile") (profile "/run/current-system/profile")
@ -227,15 +236,7 @@ explicitly appear in OS."
/bin/sh /bin/sh
/run/current-system/profile/bin/sh /run/current-system/profile/bin/sh
/run/current-system/profile/bin/bash\n")) /run/current-system/profile/bin/bash\n"))
(issue (text-file "issue" " (issue (text-file "issue" issue))
This is an alpha preview of the GNU system. Welcome.
This image features the GNU Guix package manager, which was used to
build it (http://www.gnu.org/software/guix/). The init system is
GNU dmd (http://www.gnu.org/software/dmd/).
You can log in as 'guest' or 'root' with no password.
"))
;; TODO: Generate bashrc from packages' search-paths. ;; TODO: Generate bashrc from packages' search-paths.
(bashrc (text-file* "bashrc" " (bashrc (text-file* "bashrc" "
@ -309,6 +310,7 @@ alias ll='ls -l'
(skeletons (operating-system-skeletons os))) (skeletons (operating-system-skeletons os)))
(etc-directory #:pam-services pam-services (etc-directory #:pam-services pam-services
#:skeletons skeletons #:skeletons skeletons
#:issue (operating-system-issue os)
#:locale (operating-system-locale os) #:locale (operating-system-locale os)
#:timezone (operating-system-timezone os) #:timezone (operating-system-timezone os)
#:sudoers (operating-system-sudoers os) #:sudoers (operating-system-sudoers os)