aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-09-27 19:11:27 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-09-27 19:11:27 +0200
commite7f62a41b245ca30404c54f3f77930336627c2f7 (patch)
tree4b2a24dcc84f137b92ca581dba96cf7abac70439 /doc
parent1fdab9d3b3e78b0c90b52567be5535a861a7273d (diff)
parentb48eb1e934f1d457ff6a0fec1c572bb12ed15fab (diff)
downloadpatches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar
patches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'doc')
-rw-r--r--doc/build.scm59
-rw-r--r--doc/guix.texi107
2 files changed, 139 insertions, 27 deletions
diff --git a/doc/build.scm b/doc/build.scm
index 5bc95d2517..b6a921c421 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -215,6 +215,58 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(ice-9 match)
(ice-9 threads))
+ (define (pair-open/close lst)
+ ;; Pair 'open' and 'close' tags produced by 'highlights' and
+ ;; produce nested 'paren' tags instead.
+ (let loop ((lst lst)
+ (level 0)
+ (result '()))
+ (match lst
+ ((('open open) rest ...)
+ (call-with-values
+ (lambda ()
+ (loop rest (+ 1 level) '()))
+ (lambda (inner close rest)
+ (loop rest level
+ (cons `(paren ,level ,open ,inner ,close)
+ result)))))
+ ((('close str) rest ...)
+ (if (> level 0)
+ (values (reverse result) str rest)
+ (begin
+ (format (current-error-port)
+ "warning: extra closing paren; context:~% ~y~%"
+ (reverse result))
+ (loop rest 0 (cons `(close ,str) result)))))
+ ((item rest ...)
+ (loop rest level (cons item result)))
+ (()
+ (when (> level 0)
+ (format (current-error-port)
+ "warning: missing ~a closing parens; context:~% ~y%"
+ level (reverse result)))
+ (values (reverse result) "" '())))))
+
+ (define (highlights->sxml* highlights)
+ ;; Like 'highlights->sxml', but handle nested 'paren tags. This
+ ;; allows for paren matching highlights via appropriate CSS
+ ;; "hover" properties.
+ (define (tag->class tag)
+ (string-append "syntax-" (symbol->string tag)))
+
+ (map (match-lambda
+ ((? string? str) str)
+ (('paren level open (body ...) close)
+ `(span (@ (class ,(string-append "syntax-paren"
+ (number->string level))))
+ ,open
+ (span (@ (class "syntax-symbol"))
+ ,@(highlights->sxml* body))
+ ,close))
+ ((tag text)
+ `(span (@ (class ,(tag->class tag))) ,text)))
+ highlights))
+
(define entity->string
(match-lambda
("rArr" "⇒")
@@ -252,9 +304,10 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(href #$syntax-css-url)))))
(('pre ('@ ('class "lisp")) code-snippet ...)
`(pre (@ (class "lisp"))
- ,(highlights->sxml
- (highlight lex-scheme
- (concatenate-snippets code-snippet)))))
+ ,@(highlights->sxml*
+ (pair-open/close
+ (highlight lex-scheme
+ (concatenate-snippets code-snippet))))))
((tag ('@ attributes ...) body ...)
`(,tag (@ ,@attributes) ,@(map syntax-highlight body)))
((tag body ...)
diff --git a/doc/guix.texi b/doc/guix.texi
index 843afcdd1a..6b637ddfe9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2431,7 +2431,7 @@ Create a disk image that will hold the installed system. To make a
qcow2-formatted disk image, use the @command{qemu-img} command:
@example
-qemu-img create -f qcow2 guixsd.img 50G
+qemu-img create -f qcow2 guix-system.img 50G
@end example
The resulting file will be much smaller than 50 GB (typically less than
@@ -2442,17 +2442,13 @@ Boot the USB installation image in an VM:
@example
qemu-system-x86_64 -m 1024 -smp 1 -enable-kvm \
- -net user -net nic,model=virtio -boot menu=on \
- -drive file=guix-system-install-@value{VERSION}.@var{system}.iso \
- -drive file=guixsd.img
+ -net user -net nic,model=virtio -boot menu=on,order=d \
+ -drive file=guix-system.img \
+ -drive media=cdrom,file=guix-system-install-@value{VERSION}.@var{system}.iso
@end example
-The ordering of the drives matters. @code{-enable-kvm} is optional, but
-significantly improves performance, @pxref{Running Guix in a VM}.
-
-In the VM console, quickly press the @kbd{F12} key to enter the boot
-menu. Then press the @kbd{2} key and the @kbd{RET} key to validate your
-selection.
+@code{-enable-kvm} is optional, but significantly improves performance,
+@pxref{Running Guix in a VM}.
@item
You're now root in the VM, proceed with the installation process.
@@ -2460,7 +2456,7 @@ You're now root in the VM, proceed with the installation process.
@end enumerate
Once installation is complete, you can boot the system that's on your
-@file{guixsd.img} image. @xref{Running Guix in a VM}, for how to do
+@file{guix-system.img} image. @xref{Running Guix in a VM}, for how to do
that.
@node Building the Installation Image
@@ -2759,7 +2755,7 @@ As an example, @var{file} might contain a definition like this
(@pxref{Defining Packages}):
@lisp
-@verbatiminclude package-hello.scm
+@include package-hello.scm
@end lisp
Developers may find it useful to include such a @file{guix.scm} file
@@ -2937,6 +2933,19 @@ siblings that point to specific generations:
$ rm ~/code/my-profile ~/code/my-profile-*-link
@end example
+@item --list-profiles
+List all the user's profiles:
+
+@example
+$ guix package --list-profiles
+/home/charlie/.guix-profile
+/home/charlie/code/my-profile
+/home/charlie/code/devel-profile
+/home/charlie/tmp/test
+@end example
+
+When running as root, list all the profiles of all the users.
+
@cindex collisions, in a profile
@cindex colliding packages in profiles
@cindex profile collisions
@@ -8235,7 +8244,7 @@ As an example, @var{file} might contain a package definition like this
(@pxref{Defining Packages}):
@lisp
-@verbatiminclude package-hello.scm
+@include package-hello.scm
@end lisp
@item --expression=@var{expr}
@@ -9474,7 +9483,7 @@ that Guix uses, as in this example:
;; @dots{}
;; CPE calls this package "grub2".
(properties '((cpe-name . "grub2")
- (cpe-version . "2.3")))
+ (cpe-version . "2.3"))))
@end lisp
@c See <https://www.openwall.com/lists/oss-security/2017/03/15/3>.
@@ -11788,6 +11797,7 @@ declaration.
* Virtualization Services:: Virtualization services.
* Version Control Services:: Providing remote access to Git repositories.
* Game Services:: Game servers.
+* Guix Services:: Services relating specifically to Guix.
* Miscellaneous Services:: Other services.
@end menu
@@ -12392,7 +12402,7 @@ The following example showcases how we can use an existing rule file.
@lisp
(use-modules (guix download) ;for url-fetch
(guix packages) ;for origin
- ;; @dots{})
+ @dots{})
(define %android-udev-rules
(file->udev-rule
@@ -12426,7 +12436,7 @@ well as in the @var{groups} field of the @var{operating-system} record.
@lisp
(use-modules (gnu packages android) ;for android-udev-rules
(gnu system shadow) ;for user-group
- ;; @dots{})
+ @dots{})
(operating-system
;; @dots{}
@@ -12434,8 +12444,7 @@ well as in the @var{groups} field of the @var{operating-system} record.
;; @dots{}
(supplementary-groups
'("adbusers" ;for adb
- "wheel" "netdev" "audio" "video"))
- ;; @dots{})))
+ "wheel" "netdev" "audio" "video")))))
(groups (cons (user-group (system? #t) (name "adbusers"))
%base-groups))
@@ -13352,7 +13361,7 @@ gateway @code{hostname}:
(program (file-append openssh "/bin/ssh"))
(arguments
'("ssh" "-qT" "-i" "/path/to/ssh_key"
- "-W" "smtp-server:25" "user@@hostname")))))
+ "-W" "smtp-server:25" "user@@hostname")))))))
@end lisp
See below for more details about @code{inetd-configuration}.
@@ -19822,13 +19831,12 @@ can do something along these lines:
@lisp
(define %gnu-mirror
- (plain-file
- "gnu.vcl"
- "vcl 4.1;
-backend gnu @{ .host = "www.gnu.org"; @}"))
+ (plain-file "gnu.vcl"
+ "vcl 4.1;
+backend gnu @{ .host = \"www.gnu.org\"; @}"))
(operating-system
- ...
+ ;; @dots{}
(services (cons (service varnish-service-type
(varnish-configuration
(listen '(":80"))
@@ -24327,6 +24335,57 @@ The port to bind the server to.
@end table
@end deftp
+
+@node Guix Services
+@subsection Guix Services
+
+@subsubheading Guix Data Service
+The @uref{http://data.guix.gnu.org,Guix Data Service} processes, stores
+and provides data about GNU Guix. This includes information about
+packages, derivations and lint warnings.
+
+The data is stored in a PostgreSQL database, and available through a web
+interface.
+
+@defvar {Scheme Variable} guix-data-service-type
+Service type for the Guix Data Service. Its value must be a
+@code{guix-data-service-configuration} object. The service optionally
+extends the getmail service, as the guix-commits mailing list is used to
+find out about changes in the Guix git repository.
+@end defvar
+
+@deftp {Data Type} guix-data-service-configuration
+Data type representing the configuration of the Guix Data Service.
+
+@table @asis
+@item @code{package} (default: @code{guix-data-service})
+The Guix Data Service package to use.
+
+@item @code{user} (default: @code{"guix-data-service"})
+The system user to run the service as.
+
+@item @code{group} (default: @code{"guix-data-service"})
+The system group to run the service as.
+
+@item @code{port} (default: @code{8765})
+The port to bind the web service to.
+
+@item @code{host} (default: @code{"127.0.0.1"})
+The host to bind the web service to.
+
+@item @code{getmail-idle-mailboxes} (default: @code{#f})
+If set, this is the list of mailboxes that the getmail service will be
+configured to listen to.
+
+@item @code{commits-getmail-retriever-configuration} (default: @code{#f})
+If set, this is the @code{getmail-retriever-configuration} object with
+which to configure getmail to fetch mail from the guix-commits mailing
+list.
+
+@end table
+@end deftp
+
+
@node Miscellaneous Services
@subsection Miscellaneous Services