From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cEhYK1nrx2W5fAEAqHPOHw:P1 (envelope-from ) for ; Sat, 10 Feb 2024 22:32:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cEhYK1nrx2W5fAEAqHPOHw (envelope-from ) for ; Sat, 10 Feb 2024 22:32:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="JfAU3Ii/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707600729; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Xulb9A2Z1RWqdhWhrSykJQDpGPath2OiJkcs/B9ER+k=; b=nSTGDcY2jvAjitG1NnvCbG1mSIK7g1O2OSvwkcDjyaDn32y5uJ03Hb1/HjtNHnKelnkYmi jlsxkgZa/1LT6tyJu9ANYzb+hFVpmIB7gFeMMDze5D17qvi06n248UkkoqpUVaGwWUZ5fV KkLJ0KpAkeoBloFFm43wqPG5hDN+8OllMxLgI6U49pJqvPfqy/FjOWyA67mWGgrTu3gI2K RQ9GeK7aRXeBB0+TvQBcVBvoqDhFCUCAFmOeMAX/KNfNP9SqImMo0wiN1mZjR+kAjDt0SF YoLlqv6NRZ15f25UDuLj6aqTPkoRyd2j47074BwnEylIgVd85Ppvs6VOiGkqMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="JfAU3Ii/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707600729; a=rsa-sha256; cv=none; b=fAY3uIAtSL1GXNFZcR4uvcdBT5dBThhyLp53+QmnPbjs5DJv8lws6RcYNUJkjsmP70cRuE MQ8YCns/+/lRZT4rK73IxE0Dy2t1oWix0KOkASvtVxMZP9jU0pOrF5+N2C1MThSVllGCqV 8ePjO8SyjlG/Ha2OK0/CBAkwFNmcGBwN+hVd9aYrVIAcSn+ZP7XOD+rg7qi+2OdjkZ1mEK s0dD58DtuMWEUPxGlusrAb3A71D7HZ+EpsORwbbF43p1V8TbyyhB3XSvb2hecWFotZ1+07 7cLQ77RzUNwoNdDiHMc7+9FEPRLL56YD0gq9TQeaD8gTr85sYC/QANZtH7x9uA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6EA84154CC for ; Sat, 10 Feb 2024 22:32:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYuwu-0007kk-01; Sat, 10 Feb 2024 16:31:48 -0500 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 1rYuws-0007kZ-Pd for guix-patches@gnu.org; Sat, 10 Feb 2024 16:31:46 -0500 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 1rYuws-0003C9-Hm for guix-patches@gnu.org; Sat, 10 Feb 2024 16:31:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYux8-0002KV-Ag for guix-patches@gnu.org; Sat, 10 Feb 2024 16:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68589] [PATCH] Add guix-home-service-type Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Feb 2024 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68589 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lars Rustand Cc: 68589@debbugs.gnu.org Received: via spool by 68589-submit@debbugs.gnu.org id=B68589.17076006648560 (code B ref 68589); Sat, 10 Feb 2024 21:32:02 +0000 Received: (at 68589) by debbugs.gnu.org; 10 Feb 2024 21:31:04 +0000 Received: from localhost ([127.0.0.1]:43112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYuwB-0002DL-V1 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 16:31:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYuw9-0001yJ-UC for 68589@debbugs.gnu.org; Sat, 10 Feb 2024 16:31:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYuvn-00033m-R8; Sat, 10 Feb 2024 16:30:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Xulb9A2Z1RWqdhWhrSykJQDpGPath2OiJkcs/B9ER+k=; b=JfAU3Ii/A8obXKSqw8jj quQaO9ZVBWqyKzVdBR1BOwGupzWRqt6RFq8HPPuoxmSIvh8CflPzmYZACbHUXhafI9Rt/YZUmClUa BgTv5YPKFuuCzAa6nPa9b6MKLkftgVExfHO/MWr0yar2IvvECLIDDMdTpvpt3mA8cdXNITIxdVSXT I79VHTrn6w7p1UlHPmXp+tI9K5eSiRVZ1JJNtAo/4XHwQPFyEiy/5n4RYGgbu5sZ8Hv/sZzu284s4 S3ZbS84YIag6k7YfZLQTLByRTIrCts5DyY+Egs443H8jT76QnvckN70ufXwVFNrbxSxn9Mrp5OYcd gSuaeDIlZrYEHA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87wms5e6ym.fsf@yoga.mail-host-address-is-not-set> (Lars Rustand's message of "Fri, 19 Jan 2024 15:12:13 +0100") References: <87wms5e6ym.fsf@yoga.mail-host-address-is-not-set> Date: Sat, 10 Feb 2024 22:30:35 +0100 Message-ID: <877cjchuro.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.38 X-Spam-Score: -7.38 X-Migadu-Queue-Id: 6EA84154CC X-Migadu-Scanner: mx12.migadu.com X-TUID: 55u8D9xx7P4y Hi Lars, Lars Rustand skribis: > Hoping to upstream this nice service from RDE. This service allows to > embed a home environment in a operating-system declaration. > > Original source: https://git.sr.ht/~abcdw/rde/tree/master/item/src/gnu/se= rvices/home.scm > > Change-Id: I42976cae9dd1580dc07dc866cd851294c7921725 This would be much welcome! > +++ b/gnu/services/home.scm > @@ -0,0 +1,47 @@ > +(define-module (gnu services home) Could you add a header similar to that found in other files? Since this is copied from rde, make sure to preserve their copyright notices. > +(define (guix-home-shepherd-service config) > + (map > + (lambda (x) > + (let ((user (car x)) > + (he (cdr x))) In Guix we=E2=80=99d use =E2=80=98match=E2=80=99 instead of =E2=80=98car=E2= =80=99 + =E2=80=98cdr=E2=80=99: https://guix.gnu.org/manual/devel/en/html_node/Data-Types-and-Pattern-Mat= ching.html But perhaps we could just as well define a record or similar? > +(define (guix-home-gc-roots config) > + (map cdr config)) Unused. > +(define guix-home-service-type > + (service-type > + (name 'guix-home) > + (description "Setups home-environments specified in the value.") =E2=80=9CSets up Guix Home for the specified user accounts.=E2=80=9D > + (extensions (list (service-extension > + shepherd-root-service-type > + guix-home-shepherd-service))) > + ;; (compose append) > + ;; (extend append) Why comment it out? Also make sure to register the file in =E2=80=98gnu/local.mk=E2=80=99. Last, we usually require a test for system services; you can find them in gnu/tests/*.scm. Could you try and write one? It would check for instance that the user=E2=80=99s shepherd is indeed started. Could you send an updated patch? Thanks, Ludo=E2=80=99.