From: Bruno Victal <mirai@makinata.eu>
To: 61688@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#61688] [PATCH 1/3] doc: hosts-service-type: Relocate to Base Services.
Date: Tue, 21 Feb 2023 21:37:07 +0000 [thread overview]
Message-ID: <c015426de7c2ff0ba572e70bc008f59903e1b8c5.1677015071.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1677015070.git.mirai@makinata.eu>
hosts-service-type is under (gnu services base)
* doc/guix.texi: Merge duplicated copyright lines.
(Service Reference): Move hosts-service-type to ...
(Base Services): ... here.
---
doc/guix.texi | 145 +++++++++++++++++++++++++-------------------------
1 file changed, 72 insertions(+), 73 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 05615b9549..4143488b93 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -109,11 +109,10 @@
Copyright @copyright{} 2022 Simon Streit@*
Copyright @copyright{} 2022 (@*
Copyright @copyright{} 2022 John Kehayias@*
-Copyright @copyright{} 2022 Bruno Victal@*
+Copyright @copyright{} 2022–2023 Bruno Victal@*
Copyright @copyright{} 2022 Ivan Vilata-i-Balaguer@*
Copyright @copyright{} 2023 Giacomo Leidi@*
Copyright @copyright{} 2022 Antero Mejr@*
-Copyright @copyright{} 2023 Bruno Victal@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -18021,6 +18020,77 @@ Base Services
@end lisp
@end defvar
+@defvar hosts-service-type
+Type of the service that populates the entries for (@file{/etc/hosts}).
+This service type can be extended by passing it a list of
+@code{host} records.
+
+@c TRANSLATORS: The domain names below SHOULD NOT be translated.
+@c They're domains reserved for use in documentation. (RFC6761 Section 6.5)
+@c The addresses used are explained in RFC3849 and RFC5737.
+@lisp
+(simple-service 'add-extra-hosts
+ hosts-service-type
+ (list (host "192.0.2.1" "example.com"
+ '("example.net" "example.org"))
+ (host "2001:db8::1" "example.com"
+ '("example.net" "example.org"))))
+@end lisp
+
+@quotation Note
+@cindex @file{/etc/host} default entries
+By default @file{/etc/host} comes with the following entries:
+@example
+127.0.0.1 localhost @var{host-name}
+::1 localhost @var{host-name}
+@end example
+
+For most setups this is what you want though if you find yourself in
+the situation where you want to change the default entries, you can
+do so in @code{operating-system}.@pxref{operating-system Reference,@code{essential-services}}
+
+The following example shows how one would unset @var{host-name}
+from being an alias of @code{localhost}.
+@lisp
+(operating-system
+ ;; @dots{}
+
+ (essential-services
+ (modify-services
+ (operating-system-default-essential-services this-operating-system)
+ (hosts-service-type config => (list
+ (host "127.0.0.1" "localhost")
+ (host "::1" "localhost"))))))
+@end lisp
+@end quotation
+
+@deftp {Data Type} host
+Available @code{host} fields are:
+
+@table @asis
+@item @code{address} (type: string)
+IP address.
+
+@item @code{canonical-name} (type: string)
+Hostname.
+
+@item @code{aliases} (default: @code{'()}) (type: list-of-string)
+Additional aliases that map to the same @code{canonical-name}.
+
+@end table
+@end deftp
+
+@defun host address canonical-name [aliases]
+Procedure for creating @code{host} records.
+@end defun
+
+@quotation Note
+The @code{host} data type constructor is @code{%host} though it is
+tiresome to create multiple records with it so in practice the procedure
+@code{host} (which wraps around @code{%host}) is used instead.
+@end quotation
+@end defvar
+
@deffn {Scheme Procedure} login-service @var{config}
Return a service to run login according to @var{config}, a
@code{<login-configuration>} object, which specifies the message of the day,
@@ -40508,77 +40578,6 @@ Service Reference
pointing to the given file.
@end defvar
-@defvar hosts-service-type
-Type of the service that populates the entries for (@file{/etc/hosts}).
-This service type can be extended by passing it a list of
-@code{host} records.
-
-@c TRANSLATORS: The domain names below SHOULD NOT be translated.
-@c They're domains reserved for use in documentation. (RFC6761 Section 6.5)
-@c The addresses used are explained in RFC3849 and RFC5737.
-@lisp
-(simple-service 'add-extra-hosts
- hosts-service-type
- (list (host "192.0.2.1" "example.com"
- '("example.net" "example.org"))
- (host "2001:db8::1" "example.com"
- '("example.net" "example.org"))))
-@end lisp
-
-@quotation Note
-@cindex @file{/etc/host} default entries
-By default @file{/etc/host} comes with the following entries:
-@example
-127.0.0.1 localhost @var{host-name}
-::1 localhost @var{host-name}
-@end example
-
-For most setups this is what you want though if you find yourself in
-the situation where you want to change the default entries, you can
-do so in @code{operating-system}.@pxref{operating-system Reference,@code{essential-services}}
-
-The following example shows how one would unset @var{host-name}
-from being an alias of @code{localhost}.
-@lisp
-(operating-system
- ;; @dots{}
-
- (essential-services
- (modify-services
- (operating-system-default-essential-services this-operating-system)
- (hosts-service-type config => (list
- (host "127.0.0.1" "localhost")
- (host "::1" "localhost"))))))
-@end lisp
-@end quotation
-
-@deftp {Data Type} host
-Available @code{host} fields are:
-
-@table @asis
-@item @code{address} (type: string)
-IP address.
-
-@item @code{canonical-name} (type: string)
-Hostname.
-
-@item @code{aliases} (default: @code{'()}) (type: list-of-string)
-Additional aliases that map to the same @code{canonical-name}.
-
-@end table
-@end deftp
-
-@defun host address canonical-name [aliases]
-Procedure for creating @code{host} records.
-@end defun
-
-@quotation Note
-The @code{host} data type constructor is @code{%host} though it is
-tiresome to create multiple records with it so in practice the procedure
-@code{host} (which wraps around @code{%host}) is used instead.
-@end quotation
-@end defvar
-
@defvar setuid-program-service-type
Type for the ``setuid-program service''. This service collects lists of
executable file names, passed as gexps, and adds them to the set of
--
2.39.1
next prev parent reply other threads:[~2023-02-21 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 21:34 [bug#61688] [PATCH 0/3] doc: hosts-service-type: Improve documentation Bruno Victal
2023-02-21 21:37 ` Bruno Victal [this message]
2023-02-21 21:37 ` [bug#61688] [PATCH 2/3] system: Do not export local-host-entries Bruno Victal
2023-02-21 21:37 ` [bug#61688] [PATCH 3/3] doc: hosts-service-type: Improve documentation Bruno Victal
2023-02-23 15:19 ` bug#61688: [PATCH 0/3] " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c015426de7c2ff0ba572e70bc008f59903e1b8c5.1677015071.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=61688@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).