all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin via Guix-patches via <guix-patches@gnu.org>
To: 71111@debbugs.gnu.org
Cc: "Richard Sent" <richard@freakingpenguin.com>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Andrew Tropin" <andrew@trop.in>,
	"Florian Pelz" <pelzflorian@pelzflorian.de>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Matthew Trzcinski" <matt@excalamus.com>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: [bug#71111] [PATCH v2 1/1] services: home: Use pairs instead of lists.
Date: Thu, 23 May 2024 09:53:44 +0400	[thread overview]
Message-ID: <c89139f9177259e04e17df162eb6020a41b58294.1716443624.git.andrew@trop.in> (raw)
In-Reply-To: <cover.1716372146.git.andrew@trop.in>

* gnu/services/guix.scm: Use pairs instead of lists.
* doc/guix.texi: Update accordingly.
* gnu/tests/guix.scm: Update accordingly.

Change-Id: I0b8d3fa5b214add89bdb84a11fa20d1b319435f0
---
 doc/guix.texi         | 4 ++--
 gnu/services/guix.scm | 6 ++++--
 gnu/tests/guix.scm    | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 8073e3f6d4..8cc5edc805 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39576,7 +39576,7 @@ Guix Services
 
 (operating-system
   (services (append (list (service guix-home-service-type
-                                   `(("alice" ,my-home))))
+                                   `(("alice" . ,my-home))))
                     %base-services)))
 @end lisp
 
@@ -39585,7 +39585,7 @@ Guix Services
 
 @lisp
 (simple-service 'my-extra-home home-service-type
-                `(("bob" ,my-extra-home))))
+                `(("bob" . ,my-extra-home))))
 @end lisp
 @end defvar
 
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index 96f5ecaac0..3818749baa 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -696,7 +696,7 @@ (define guix-data-service-type
 
 (define (guix-home-shepherd-service config)
   (map (match-lambda
-         ((user he)
+         (((? string? user) . (? home-environment? he))
           (shepherd-service
            (documentation "Activate Guix Home.")
            (requirement '(user-processes))
@@ -710,7 +710,9 @@ (define (guix-home-shepherd-service config)
                      (list (string-append "HOME=" (passwd:dir (getpw #$user)))
                            "GUIX_SYSTEM_IS_RUNNING_HOME_ACTIVATE=t")
                      #:group (group:name (getgrgid (passwd:gid (getpw #$user))))))
-           (stop #~(make-kill-destructor)))))
+           (stop #~(make-kill-destructor))))
+         (e (error "Invalid value for guix-home, it should be in a form of
+(\"user-name\" . home-environment), but the following value is provided:\n" e)))
        config))
 
 (define guix-home-service-type
diff --git a/gnu/tests/guix.scm b/gnu/tests/guix.scm
index 12ad1bf255..6071cb018e 100644
--- a/gnu/tests/guix.scm
+++ b/gnu/tests/guix.scm
@@ -271,7 +271,7 @@ (define %guix-home-service-he
 (define %guix-home-service-os
   (simple-operating-system
    (service guix-home-service-type
-            `(("alice" ,%guix-home-service-he)))))
+            `(("alice" . ,%guix-home-service-he)))))
 
 (define (run-guix-home-service-test)
   (define os
-- 
2.41.0





  parent reply	other threads:[~2024-05-23  5:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 10:02 [bug#71111] [PATCH 0/1] services: home: Use pairs instead of lists Andrew Tropin via Guix-patches via
2024-05-22 10:02 ` [bug#71112] [PATCH 1/1] " Andrew Tropin via Guix-patches via
2024-05-22 11:06 ` [bug#71111] " Andrew Tropin via Guix-patches via
2024-05-22 21:33 ` [bug#71111] [PATCH 0/1] " Richard Sent
2024-05-23  5:45   ` Andrew Tropin via Guix-patches via
2024-05-23  3:38 ` Zheng Junjie
2024-05-23  5:43   ` Andrew Tropin via Guix-patches via
2024-05-23 16:02     ` Maxim Cournoyer
2024-05-23  5:53 ` [bug#71111] [PATCH v2 " Andrew Tropin via Guix-patches via
2024-05-23  5:53 ` Andrew Tropin via Guix-patches via [this message]
2024-05-23  9:16   ` [bug#71111] [PATCH v2 1/1] " Ludovic Courtès
2024-05-23 13:06     ` Andrew Tropin via Guix-patches via
2024-06-02  9:50 ` [bug#71111] [PATCH 0/1] " Andrew Tropin via Guix-patches via
2024-06-02 10:15   ` Ludovic Courtès
2024-06-02 10:37     ` Efraim Flashner
2024-06-02 11:12       ` Andrew Tropin via Guix-patches via
2024-06-02 10:57     ` Andrew Tropin via Guix-patches via

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c89139f9177259e04e17df162eb6020a41b58294.1716443624.git.andrew@trop.in \
    --to=guix-patches@gnu.org \
    --cc=71111@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=ludo@gnu.org \
    --cc=matt@excalamus.com \
    --cc=maxim.cournoyer@gmail.com \
    --cc=pelzflorian@pelzflorian.de \
    --cc=richard@freakingpenguin.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.