[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#66156] [PATCH 11/12] doc: Give an example showing how to add an acc
From: |
Ludovic Courtès |
Subject: |
[bug#66156] [PATCH 11/12] doc: Give an example showing how to add an account in the childhurd. |
Date: |
Fri, 22 Sep 2023 14:54:12 +0200 |
* doc/guix.texi (Virtualization Services): Give an example showing how
to add an account.
---
doc/guix.texi | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 95f29a2d19..53b0ebd1db 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35727,6 +35727,57 @@ Virtualization Services
substitute keys, and so on---see the explanation of @code{secret-root}
below.
+You will probably find it useful to create an account for you in the
+GNU/Hurd virtual machine and to authorize logins with your SSH key. To
+do that, you can define the GNU/Hurd system in the usual way
+(@pxref{Using the Configuration System}), and then pass that operating
+system as the @code{os} field of @code{hurd-vm-configuration}, as in
+this example:
+
+@lisp
+(define childhurd-os
+ ;; Definition of my GNU/Hurd system, derived from the default one.
+ (operating-system
+ (inherit %hurd-vm-operating-system)
+
+ ;; Add a user account.
+ (users (cons (user-account
+ (name "charlie")
+ (comment "This is me!")
+ (group "users")
+ (supplementary-groups '("wheel"))) ;for 'sudo'
+ %base-user-accounts))
+
+ (services
+ ;; Modify the SSH configuration to allow login as "root"
+ ;; and as "charlie" using public key authentication.
+ (modify-services (operating-system-user-services
+ %hurd-vm-operating-system)
+ (openssh-service-type
+ config => (openssh-configuration
+ (inherit config)
+ (authorized-keys
+ `(("root"
+ ,(local-file
+ "/home/charlie/.ssh/id_rsa.pub"))
+ ("charlie"
+ ,(local-file
+ "/home/charlie/.ssh/id_rsa.pub"))))))))))
+
+(operating-system
+ ;; @dots{}
+ (services
+ ;; Add the 'hurd-vm' service, configured to use the
+ ;; operating system configuration above.
+ (append (list (service hurd-vm-service-type
+ (hurd-vm-configuration
+ (os %childhurd-os))))
+ %base-services)))
+@end lisp
+
+That's it! The remainder of this section provides the reference of the
+service configuration.
+
@defvar hurd-vm-service-type
This is the type of the Hurd in a Virtual Machine service. Its value
must be a @code{hurd-vm-configuration} object, which specifies the
--
2.41.0
- [bug#66156] [PATCH 00/12] Introducing Smart Hurdloading, Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 01/12] system: vm: Remove unused variable., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 02/12] secret-service: Increase default handshake timeout., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 03/12] services: hurd-vm: Use the default SSH port number., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 04/12] gnu: glibc-utf8-locales: Reintroduce input labels., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 05/12] services: guix: Use the right locale package on GNU/Hurd., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 07/12] services: childhurd: Authorize the childhurd’s key on the host., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 09/12] tests: hurd-vm: Remove custom disk image configuration., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 06/12] services: guix: Support declarative offloading setup., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 10/12] services: hurd-vm: Disable password-based authentication for root., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 11/12] doc: Give an example showing how to add an account in the childhurd.,
Ludovic Courtès <=
- [bug#66156] [PATCH 08/12] services: hurd-vm: ‘image’ field has to be an <image> record., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 12/12] services: hurd-vm: Implement zero-configuration offloading., Ludovic Courtès, 2023/09/22
- [bug#66156] [PATCH 00/12] Introducing Smart Hurdloading, Janneke Nieuwenhuizen, 2023/09/22