doc: Add new Swap Space section.

* doc/guix.texi (operating-system Reference): Update swap-devices.
* doc/guix.texi (Swap Space): Add it.
* gnu/system/examples/desktop.tmpl: Add swap-devices example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Josselin Poiret 2021-11-15 20:26:31 +00:00 committed by Ludovic Courtès
parent 4af3262d98
commit 9685c0637d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 116 additions and 38 deletions

View file

@ -1,6 +1,6 @@
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.
;; root partition is encrypted with LUKS, and a swap file.
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop xorg)
@ -42,6 +42,11 @@
(type "vfat")))
%base-file-systems))
;; Specify a swap file for the system, which resides on the
;; root file system.
(swap-devices (list (swap-space
(target "/swapfile"))))
;; Create user `bob' with `alice' as its initial password.
(users (cons (user-account
(name "bob")