From patchwork Thu May 23 05:53:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tropin X-Patchwork-Id: 64844 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F11DC27BBEA; Thu, 23 May 2024 06:56:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1753827BBE9 for ; Thu, 23 May 2024 06:56:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sA1Qr-0000cM-6v; Thu, 23 May 2024 01:56:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1Qp-0000bu-V5 for guix-patches@gnu.org; Thu, 23 May 2024 01:56:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sA1Qp-0007rc-Kr; Thu, 23 May 2024 01:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sA1Qo-0006xR-Oj; Thu, 23 May 2024 01:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71111] [PATCH v2 1/1] services: home: Use pairs instead of lists. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 23 May 2024 05:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71111 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71111@debbugs.gnu.org Cc: Richard Sent , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Andrew Tropin , Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.171644375626733 (code B ref -1); Thu, 23 May 2024 05:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2024 05:55:56 +0000 Received: from localhost ([127.0.0.1]:58470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1Qi-0006x7-2u for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:35348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sA1Qb-0006wp-VP for submit@debbugs.gnu.org; Thu, 23 May 2024 01:55:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1QV-0000SS-AR for guix-patches@gnu.org; Thu, 23 May 2024 01:55:43 -0400 Received: from out-189.mta0.migadu.com ([2001:41d0:1004:224b::bd]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sA1QP-0007mF-9X; Thu, 23 May 2024 01:55:42 -0400 X-Envelope-To: guix-patches@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1716443735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZdDAIFYVkMq1LObxp7K1kyAQ6MlTtIaY5PWon6vJN0c=; b=PuLYc5I5HbIY0/m1r7ZC1aTeLzRHPmfJo/aqwuEwaKLRCZiVMhqeLFHuVwdlOxIRPqK04D 4sP94MSmOCWTLzye2Vyyldj2dsGLCRyJxdAmivXwil4BpchMlihZs5GGgoeAIfd6+m6r03 G7Stv8t48OCFABP49YUoKsjL4K1UzOYl7uhVtfc1dD/IXXkVrMSMP3H955cTzH2SQ9L+hk YZiQg6rsBVoi0GnHT6R6w+33pBN02x6i8HTrdOuZRB2wy9951et9UhU1He1FAKphQkB5LG +Y9JNWMP2DGwfcoznZ9QT8j+8YUy/B9YueExikUWnQvqJIkOikUW+BG/jHl1MA== X-Envelope-To: andrew@trop.in X-Envelope-To: richard@freakingpenguin.com X-Envelope-To: ludo@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Date: Thu, 23 May 2024 09:53:44 +0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::bd; envelope-from=andrew@trop.in; helo=out-189.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Andrew Tropin X-ACL-Warn: , Andrew Tropin via Guix-patches X-Patchwork-Original-From: Andrew Tropin via Guix-patches via From: Andrew Tropin Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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