mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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:
parent
5d69fb54fb
commit
0918e64a49
1 changed files with 32 additions and 26 deletions
|
@ -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,33 +3126,38 @@ 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")
|
(bootloader (grub-configuration
|
||||||
(bootloader (grub-configuration
|
(device "/dev/sda")))
|
||||||
(device "/dev/sda")))
|
(file-systems (list (file-system
|
||||||
(file-systems (list (file-system
|
(device "/dev/sda1") ; or partition label
|
||||||
(device "/dev/sda1") ; or partition label
|
(mount-point "/")
|
||||||
(mount-point "/")
|
(type "ext3"))))
|
||||||
(type "ext3"))))
|
(users (list (user-account
|
||||||
(users (list (user-account
|
(name "alice")
|
||||||
(name "alice")
|
(password "")
|
||||||
(password "")
|
(uid 1000) (gid 100)
|
||||||
(uid 1000) (gid 100)
|
(comment "Bob's sister")
|
||||||
(comment "Bob's sister")
|
(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
|
||||||
|
|
Loading…
Reference in a new issue