doc: Improve wording and example in "Using the Configuration System".

* doc/guix.texi (Using the Configuration System): Make the intro more
  user-oriented.  Change example to return an operating system.  Fix
  typos.  Mention mandatory/optional fields.
This commit is contained in:
Ludovic Courtès 2014-06-27 23:20:26 +02:00
parent 5d69fb54fb
commit 0918e64a49
1 changed files with 32 additions and 26 deletions

View File

@ -3114,10 +3114,11 @@ instance to support new system services.
@node Using the Configuration System @node Using the Configuration System
@subsection Using the Configuration System @subsection Using the Configuration System
The operating system is configured by filling in an The operating system is configured by providing an
@code{operating-system} structure, as defined by the @code{(gnu system)} @code{operating-system} declaration in a file that can then be passed to
module. A simple setup, with the default system services, the default the @command{guix system} command (@pxref{Invoking guix system}). A
Linux-Libre kernel, initial RAM disk, and boot loader looks like this: simple setup, with the default system services, the default Linux-Libre
kernel, initial RAM disk, and boot loader looks like this:
@findex operating-system @findex operating-system
@lisp @lisp
@ -3125,8 +3126,7 @@ Linux-Libre kernel, initial RAM disk, and boot loader looks like this:
(gnu packages emacs) ; for 'emacs' (gnu packages emacs) ; for 'emacs'
(gnu services ssh)) ; for 'lsh-service' (gnu services ssh)) ; for 'lsh-service'
(define komputilo (operating-system
(operating-system
(host-name "komputilo") (host-name "komputilo")
(timezone "Europe/Paris") (timezone "Europe/Paris")
(locale "fr_FR.UTF-8") (locale "fr_FR.UTF-8")
@ -3144,14 +3144,20 @@ Linux-Libre kernel, initial RAM disk, and boot loader looks like this:
(home-directory "/home/alice")))) (home-directory "/home/alice"))))
(packages (cons emacs %base-packages)) (packages (cons emacs %base-packages))
(services (cons (lsh-service #:port 2222 #:allow-root-login? #t) (services (cons (lsh-service #:port 2222 #:allow-root-login? #t)
%base-services)))) %base-services)))
@end lisp @end lisp
This example should be self-describing. The @code{packages} field lists This example should be self-describing. Some of the fields defined
above, such as @code{host-name} and @code{bootloader}, are mandatory.
Others, such as @code{packages} and @code{services}, can be omitted, in
which case they get a default value.
@vindex %base-packages
The @code{packages} field lists
packages that will be globally visible on the system, for all user packages that will be globally visible on the system, for all user
accounts---i.e., in every user's @code{PATH} environment variable---in accounts---i.e., in every user's @code{PATH} environment variable---in
addition to the per-user profiles (@pxref{Invoking guix package}). The addition to the per-user profiles (@pxref{Invoking guix package}). The
@var{%base-packages} variables provides all the tools one would expect @var{%base-packages} variable provides all the tools one would expect
for basic user and administrator tasks---including the GNU Core for basic user and administrator tasks---including the GNU Core
Utilities, the GNU Networking Utilities, the GNU Zile lightweight text Utilities, the GNU Networking Utilities, the GNU Zile lightweight text
editor, @command{find}, @command{grep}, etc. The example above adds editor, @command{find}, @command{grep}, etc. The example above adds