services: Use more Texinfo markup in docstrings.

* gnu/services/base.scm (host-name-service): Use Texinfo markup.
  (mingetty-service): Comment on #:allow-empty-passwords?.  Improve
  markup.
  (syslog-service, guix-service): Use Texinfo markup.
* gnu/services/networking.scm (static-networking-service): Likewise.
* gnu/services/xorg.scm (slim-service): Likewise.
master
Ludovic Courtès 2014-07-11 22:57:02 +02:00
parent da417ffe3b
commit 51da7ca095
3 changed files with 20 additions and 14 deletions

View File

@ -189,7 +189,7 @@ stopped before 'kill' is called."
(respawn? #f))))) (respawn? #f)))))
(define (host-name-service name) (define (host-name-service name)
"Return a service that sets the host name to NAME." "Return a service that sets the host name to @var{name}."
(with-monad %store-monad (with-monad %store-monad
(return (service (return (service
(documentation "Initialize the machine's host name.") (documentation "Initialize the machine's host name.")
@ -204,6 +204,10 @@ stopped before 'kill' is called."
auto-login auto-login
login-program login-program
login-pause? login-pause?
;; Allow empty passwords by default so that
;; first-time users can log in when the 'root'
;; account has just been created.
(allow-empty-passwords? #t)) (allow-empty-passwords? #t))
"Return a service to run mingetty on @var{tty}. "Return a service to run mingetty on @var{tty}.
@ -218,7 +222,7 @@ of the log-in program (the default is the @code{login} program from the Shadow
tool suite.) tool suite.)
@var{motd} is a monadic value containing a text file to use as @var{motd} is a monadic value containing a text file to use as
the \"message of the day\"." the ``message of the day''."
(mlet %store-monad ((motd motd) (mlet %store-monad ((motd motd)
(login-program (cond ((gexp? login-program) (login-program (cond ((gexp? login-program)
(return login-program)) (return login-program))
@ -277,7 +281,7 @@ the \"message of the day\"."
(respawn? #f))))) (respawn? #f)))))
(define (syslog-service) (define (syslog-service)
"Return a service that runs 'syslogd' with reasonable default settings." "Return a service that runs @code{syslogd} with reasonable default settings."
;; Snippet adapted from the GNU inetutils manual. ;; Snippet adapted from the GNU inetutils manual.
(define contents " (define contents "
@ -364,12 +368,12 @@ failed to register hydra.gnu.org public key: ~a~%" status))))))))
(define* (guix-service #:key (guix guix) (builder-group "guixbuild") (define* (guix-service #:key (guix guix) (builder-group "guixbuild")
(build-accounts 10) authorize-hydra-key?) (build-accounts 10) authorize-hydra-key?)
"Return a service that runs the build daemon from GUIX, and has "Return a service that runs the build daemon from @var{guix}, and has
BUILD-ACCOUNTS user accounts available under BUILD-USER-GID. @var{build-accounts} user accounts available under @var{builder-group}.
When AUTHORIZE-HYDRA-KEY? is true, the hydra.gnu.org public key provided by When @var{authorize-hydra-key?} is true, the @code{hydra.gnu.org} public key
GUIX is authorized upon activation, meaning that substitutes from provided by @var{guix} is authorized upon activation, meaning that substitutes
hydra.gnu.org are used by default." from @code{hydra.gnu.org} are used by default."
(define activate (define activate
;; Assume that the store has BUILDER-GROUP as its group. We could ;; Assume that the store has BUILDER-GROUP as its group. We could
;; otherwise call 'chown' here, but the problem is that on a COW unionfs, ;; otherwise call 'chown' here, but the problem is that on a COW unionfs,

View File

@ -36,8 +36,9 @@
(name-servers '()) (name-servers '())
(inetutils inetutils) (inetutils inetutils)
(net-tools net-tools)) (net-tools net-tools))
"Return a service that starts INTERFACE with address IP. If GATEWAY is "Return a service that starts @var{interface} with address @var{ip}. If
true, it must be a string specifying the default network gateway." @var{gateway} is true, it must be a string specifying the default network
gateway."
;; TODO: Eventually we should do this using Guile's networking procedures, ;; TODO: Eventually we should do this using Guile's networking procedures,
;; like 'configure-qemu-networking' does, but the patch that does this is ;; like 'configure-qemu-networking' does, but the patch that does this is

View File

@ -112,11 +112,12 @@ EndSection
(xauth xauth) (dmd dmd) (bash bash) (xauth xauth) (dmd dmd) (bash bash)
startx) startx)
"Return a service that spawns the SLiM graphical login manager, which in "Return a service that spawns the SLiM graphical login manager, which in
turn start the X display server with STARTX, a command as returned by turn starts the X display server with @var{startx}, a command as returned by
'xorg-start-command'. @code{xorg-start-command}.
When ALLOW-EMPTY-PASSWORDS? is true, allow logins with an empty password. When @var{allow-empty-passwords?} is true, allow logins with an empty
When AUTO-LOGIN? is true, log in automatically as DEFAULT-USER." password. When @var{auto-login?} is true, log in automatically as
@var{default-user}."
(define (slim.cfg) (define (slim.cfg)
(mlet %store-monad ((startx (or startx (xorg-start-command))) (mlet %store-monad ((startx (or startx (xorg-start-command)))
(xinitrc (xinitrc))) (xinitrc (xinitrc)))