doc: Show both the "bare-bones" and the "desktop" configurations.
* doc/guix.texi (System Installation): Add xref to "Using the Configuration System" instead of including one here. (Using the Configuration System): Remove first example, and include os-config-bare-bones.texi instead. Include os-config-desktop.texi as a second example. * doc.am (OS_CONFIG_EXAMPLES_TEXI): New variable. (BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Use it. (doc/os-config.texi): Remove. (doc/os-config-%.texi): New target.
This commit is contained in:
parent
e1fbc32a0a
commit
dd51caac55
|
@ -112,3 +112,5 @@ GTAGS
|
||||||
/emacs/guix-helper.scm
|
/emacs/guix-helper.scm
|
||||||
/emacs/guix-init.el
|
/emacs/guix-init.el
|
||||||
/emacs/guix-profiles.el
|
/emacs/guix-profiles.el
|
||||||
|
/doc/os-config-bare-bones.texi
|
||||||
|
/doc/os-config-desktop.texi
|
||||||
|
|
14
doc.am
14
doc.am
|
@ -25,12 +25,16 @@ EXTRA_DIST += \
|
||||||
doc/images/bootstrap-graph.eps \
|
doc/images/bootstrap-graph.eps \
|
||||||
doc/images/bootstrap-graph.pdf
|
doc/images/bootstrap-graph.pdf
|
||||||
|
|
||||||
# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
|
OS_CONFIG_EXAMPLES_TEXI = \
|
||||||
BUILT_SOURCES += doc/os-config.texi
|
doc/os-config-bare-bones.texi \
|
||||||
EXTRA_DIST += doc/os-config.texi
|
doc/os-config-desktop.texi
|
||||||
MAINTAINERCLEANFILES = doc/os-config.texi
|
|
||||||
|
|
||||||
doc/os-config.texi: gnu/system/examples/bare-bones.tmpl
|
# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
|
||||||
|
BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
|
||||||
|
EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
|
||||||
|
MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
|
||||||
|
|
||||||
|
doc/os-config-%.texi: gnu/system/examples/%.tmpl
|
||||||
$(MKDIR_P) "`dirname "$@"`"
|
$(MKDIR_P) "`dirname "$@"`"
|
||||||
cp "$<" "$@"
|
cp "$<" "$@"
|
||||||
|
|
||||||
|
|
|
@ -3925,20 +3925,14 @@ that end, the installation system comes with two text editors: GNU nano
|
||||||
It is better to store that file on the target root file system, say, as
|
It is better to store that file on the target root file system, say, as
|
||||||
@file{/mnt/etc/config.scm}.
|
@file{/mnt/etc/config.scm}.
|
||||||
|
|
||||||
A minimal operating system configuration, with just the bare minimum and
|
@xref{Using the Configuration System}, for examples of operating system
|
||||||
only a root account would look like this (on the installation system,
|
configurations. These examples are available under
|
||||||
this example is available as @file{/etc/configuration/bare-bones.scm}):
|
@file{/etc/configuration} in the installation image, so you can copy
|
||||||
|
them and use them as a starting point for your own configuration.
|
||||||
|
|
||||||
@example
|
Once you are done preparing the configuration file, the new system must
|
||||||
@include os-config.texi
|
be initialized (remember that the target root file system is mounted
|
||||||
@end example
|
under @file{/mnt}):
|
||||||
|
|
||||||
@noindent
|
|
||||||
For more information on @code{operating-system} declarations,
|
|
||||||
@pxref{Using the Configuration System}.
|
|
||||||
|
|
||||||
Once that is done, the new system must be initialized (remember that the
|
|
||||||
target root file system is mounted under @file{/mnt}):
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
guix system init /mnt/etc/config.scm /mnt
|
guix system init /mnt/etc/config.scm /mnt
|
||||||
|
@ -4021,29 +4015,7 @@ kernel, initial RAM disk, and boot loader looks like this:
|
||||||
|
|
||||||
@findex operating-system
|
@findex operating-system
|
||||||
@lisp
|
@lisp
|
||||||
(use-modules (gnu) ; for 'user-account', '%base-services', etc.
|
@include os-config-bare-bones.texi
|
||||||
(gnu packages emacs) ; for 'emacs'
|
|
||||||
(gnu services ssh)) ; for 'lsh-service'
|
|
||||||
|
|
||||||
(operating-system
|
|
||||||
(host-name "komputilo")
|
|
||||||
(timezone "Europe/Paris")
|
|
||||||
(locale "fr_FR.utf8")
|
|
||||||
(bootloader (grub-configuration
|
|
||||||
(device "/dev/sda")))
|
|
||||||
(file-systems (cons (file-system
|
|
||||||
(device "/dev/sda1") ; or partition label
|
|
||||||
(mount-point "/")
|
|
||||||
(type "ext3"))
|
|
||||||
%base-file-systems))
|
|
||||||
(users (list (user-account
|
|
||||||
(name "alice")
|
|
||||||
(group "users")
|
|
||||||
(comment "Bob's sister")
|
|
||||||
(home-directory "/home/alice"))))
|
|
||||||
(packages (cons emacs %base-packages))
|
|
||||||
(services (cons (lsh-service #:port 2222 #:root-login? #t)
|
|
||||||
%base-services)))
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
This example should be self-describing. Some of the fields defined
|
This example should be self-describing. Some of the fields defined
|
||||||
|
@ -4076,6 +4048,17 @@ generated as needed (@pxref{Defining Services}). @xref{operating-system
|
||||||
Reference}, for details about the available @code{operating-system}
|
Reference}, for details about the available @code{operating-system}
|
||||||
fields.
|
fields.
|
||||||
|
|
||||||
|
The configuration for a typical ``desktop'' usage, with the X11 display
|
||||||
|
server, a desktop environment, network management, an SSH server, and
|
||||||
|
more, would look like this:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
@include os-config-desktop.texi
|
||||||
|
@end lisp
|
||||||
|
|
||||||
|
@xref{Desktop Services}, for the exact list of services provided by
|
||||||
|
@var{%desktop-services}.
|
||||||
|
|
||||||
Assuming the above snippet is stored in the @file{my-system-config.scm}
|
Assuming the above snippet is stored in the @file{my-system-config.scm}
|
||||||
file, the @command{guix system reconfigure my-system-config.scm} command
|
file, the @command{guix system reconfigure my-system-config.scm} command
|
||||||
instantiates that configuration, and makes it the default GRUB boot
|
instantiates that configuration, and makes it the default GRUB boot
|
||||||
|
|
Loading…
Reference in New Issue