GNU bug report logs - #77266
[PATCH] gnu: Merge xorg configurations when extending.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ian Eure <ian@HIDDEN>; Keywords: patch; dated Wed, 26 Mar 2025 04:25:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 24 Apr 2025 23:59:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 24 19:59:08 2025
Received: from localhost ([127.0.0.1]:42786 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u86TD-0001pQ-77
	for submit <at> debbugs.gnu.org; Thu, 24 Apr 2025 19:59:07 -0400
Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]:40061)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u86T9-0001ol-8p
 for 77266 <at> debbugs.gnu.org; Thu, 24 Apr 2025 19:59:04 -0400
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfout.phl.internal (Postfix) with ESMTP id 2685F13801CA;
 Thu, 24 Apr 2025 19:58:56 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Thu, 24 Apr 2025 19:58:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:reply-to
 :subject:subject:to:to; s=fm2; t=1745539136; x=1745625536; bh=Y3
 6RgY8EAEA+9K2ib0II3MsngK/3dfQwx3gDKCE3hgI=; b=IOf53th9v5e/0PefvP
 lKEDjhM/0F7T+RCSsboprw3RR0nj9JZzm5YzWdeW90l/aLi7Z/WYCX0r+1/TbjRn
 Ge5i1Th3PLcI9MGIy/2+NlgJtjUHD2L5KpwXWe7gpJzgpjbHSlZ5s21mSWBDjplK
 NtQeROl/cKO1rBAJKUIu5n9aFeHLOP+6/GyOEK8Yoj7QMulzwwZL9b+KxRtUNZnW
 I/ROzjR9zlevuzdxdpGds/weelFkj4pzIk4EBPzyXEnpdj3gV8qyp6FZVwsONPH+
 zUtVfhR38FT3Ozl9Y9Bt7KmkVW4/hrijSnFYyifhjejUIiRsul+2L1ynvR0gbv3O
 56uQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm3; t=1745539136; x=1745625536; bh=Y36RgY8EAEA+9K2ib0II3MsngK/3
 dfQwx3gDKCE3hgI=; b=SRrZm5wDj4Jp+tiluS7xVAnsdRz81kOGNiVF6FE05u6f
 OuXZRJUz68yWDLzLlWgScRap3nYAJ6ByU5bBwYHux4kryvR81/QE4ZqC24gtPX9z
 fWnUv0wtmetm8zVYBvH3iGIm3n6ZUOvp+ngDrVWNswaKBoOZ2nah7kOsbIzsFC6I
 yxENNQCQn+g6B5kqelVdpEkcscTyEeAzpTxeV57bh3+h7bpHqPG2CoU/VKJHPu7o
 NZrahMhT206XPbr3GDc+G2ve2TlB45DjM6nwgbCnOvr7wSp3wDEpZj+I6u+qddVJ
 Dkfn7bO5Sktus86LvgZawRnSf/GPpdlgW9Q+GQKz0Q==
X-ME-Sender: <xms:P9AKaLXCnL5fStqHPN6EF4Pt3kr61fvnD-jSYXvBUrnooQJNEzM1dw>
 <xme:P9AKaDmhf7yjVcVWYZOTNZHk-mh_2klOFK5niliUZgB8854_I4yo_DBLOFD1MmklM
 29D6NSssJBs9Me0JA>
X-ME-Received: <xmr:P9AKaHYzHfNjAoBrgN4AthzJGmfuB8SDUZpPF6hXBIoy3BFH25v4FYpOHL3AbOG3bA3dNTHuDN1KFy0WCVUljebuM4qcjHhNcTBW>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvhedtkeegucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefufgffkfggtgfgsehtqhertddtreej
 necuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvheqne
 cuggftrfgrthhtvghrnheptdetkeffffefiefhueekvdeiueegieegffdthfelveelgfdt
 vdfhtdduheffuedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopedvpdhm
 ohguvgepshhmthhpohhuthdprhgtphhtthhopeejjedvieeiseguvggssghughhsrdhgnh
 hurdhorhhgpdhrtghpthhtoheplhhuughosegthhgsohhuihgsrdhorhhg
X-ME-Proxy: <xmx:P9AKaGVZVsmKHLnv-AHFE1TTBirtuVf5BsCa4OGPyNUyuG3h9kmkVA>
 <xmx:P9AKaFmSdIkkkeWRLG8A2Tk2ajJ6tqUp454UKMYKMVvnnJmRNATRkw>
 <xmx:P9AKaDfiENv3ypKFsPQMIneW2MDNz2uCRnphHnCKkdM23LQiHuJzPA>
 <xmx:P9AKaPFMvyBjlElTz3JdVxGvaoWa43shDmVeSK8HE8rI8ZABtwQTwA>
 <xmx:QNAKaJ0I4dHPFHovv_jPPhW2C2a0Q9fRBL3ZmQeSVDFK0HNbEprDU9Am>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 24 Apr 2025 19:58:54 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Thu, 24 Apr 2025 16:58:36 -0700
Message-ID: <8734dxi02b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Ludo=E2=80=99,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi,
>
> Ian Eure <ian@HIDDEN> writes:
>
>>>   (append (list (service gdm-service-type)
>>>                 %xorg-intel-service
>>>                 =E2=80=A6)
>>>           @dots{})
>>
>> Can make these changes, but I=E2=80=99m curious why (append (list ...)=20
>> ...) is
>> preferred over cons*.  I default to the latter, because I like=20
>> the
>> removal of the extra level of indent.
>
> In most of the examples in the documentation, we went for=20
> =E2=80=98append=E2=80=99
> because it less obscure to a newcomer than =E2=80=98cons*=E2=80=99 (or =
=E2=80=98cons=E2=80=99,=20
> even).
>
> That=E2=80=99s also what the installer generates, and =E2=80=98guix home =
import=E2=80=99=20
> I
> believe.

Makes sense.  I sent a v4 with these changes and some doc=20
rewording.

Thanks,

  -- Ian





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 22 Apr 2025 13:44:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 09:44:24 2025
Received: from localhost ([127.0.0.1]:46936 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7DvD-0003nO-Vr
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 09:44:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60272)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1u7Dv6-0003mi-Ms
 for 77266 <at> debbugs.gnu.org; Tue, 22 Apr 2025 09:44:17 -0400
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 <ludo@HIDDEN>)
 id 1u7Dv0-0004pv-Db; Tue, 22 Apr 2025 09:44:10 -0400
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=+o77f+s6h7iy88j+aeWMipsbOjoQisQHuuVQ/uL40f0=; b=npKDJX65zgRtFwPH81Lw
 9QYbcuiieMUr+wzNeKC3Q4EIkxizOxIVwKXCYEDHspDQl1mRUgHKE1CHoPTJXH2/dlHUSIcRMnXA/
 8GGd4mjF9x3FTYoDKHdSzXVEuS9pdQo1dA/KN4Bj6ChHZpOfhvsESbutKZlnGkUqBs0IcoM1g9aPe
 tFAspvxsMsSCn5bBi6yyBisZnu0QpzO+h9VPmKctWpquoy9FX/LaScfH3Mede/YqYciQNOb8DH/g9
 06JGl/SxRytuV8bqaMLjwBcto47whhDBK8/u5bcgN1+jbFty/PMeJPcFAwB+g89p1DkJEgn+rZgRC
 GqKysgUbLve4tQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ian Eure <ian@HIDDEN>
Subject: Re: [bug#77266] [PATCH v3 1/2] gnu: Merge xorg configurations when
 extending.
In-Reply-To: <87h62hhx0c.fsf@HIDDEN> (Ian Eure's message of "Mon, 21 Apr
 2025 17:15:31 -0700")
References: <87h62hhx0c.fsf@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
X-URL: https://people.bordeaux.inria.fr/lcourtes/
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
X-Revolutionary-Date: Tridi 3 =?utf-8?Q?Flor=C3=A9al?= an 233 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de la
 =?utf-8?Q?Foug=C3=A8re?=
Date: Tue, 22 Apr 2025 15:18:36 +0200
Message-ID: <87ldrstjv7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ian Eure <ian@HIDDEN> writes:

> Do you have / know of a setup for editing Guile inside the
> documentation?  I=E2=80=99ve been editing in a *scheme* scratch buffer in
> Emacs and pasting back into the docs, but this clearly doesn=E2=80=99t wo=
rk
> very well.

That=E2=80=99s what I do as well.  Low-tech, but it=E2=80=99s also useful t=
o test the
example beforehand.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 22 Apr 2025 00:19:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 20:19:07 2025
Received: from localhost ([127.0.0.1]:41197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u71Ls-00065L-Bx
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:19:07 -0400
Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]:50621)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u71Lk-00064K-6M
 for 77266 <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:18:59 -0400
Received: from phl-compute-12.internal (phl-compute-12.phl.internal
 [10.202.2.52])
 by mailfout.phl.internal (Postfix) with ESMTP id D7330138076D;
 Mon, 21 Apr 2025 20:18:50 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-12.internal (MEProxy); Mon, 21 Apr 2025 20:18:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745281130;
 x=1745367530; bh=Fref9yIh054FZTo/eF3BiXa+e9S6FfIizB5fUf8Reok=; b=
 WWOzvROiO3bzDFNpNdjSEN+sDaTX8R/h2GUEFTiuJpqL8FXnPtsGY9EngnHhC3Dt
 Ow20N5sWv9g+e1W1IZN9Bm1cn+jziu9faDpY/qCOPXz41QQ9hLhbnZrAihNiTKpJ
 Bh4NvLaYGwinyUJ6wplIVwImsV+N3Z2hsMg6eywLzJGrGkg72Z+MieuRxbrG1u08
 PxJQF1o7Fb09QYYgOO5cZ3O7Pt7BHv6uFtHuFJxoQaP867oqxcmsxi+KX+u+RhoC
 XPDo9qp1LRQgiIPSin+5021Mvcy7ZOOqQ3toYq1ZDMs2XKvTPMM1ofmZOO3EkBbN
 w3sC9i0dHu6upVPWDmTg9g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1745281130; x=
 1745367530; bh=Fref9yIh054FZTo/eF3BiXa+e9S6FfIizB5fUf8Reok=; b=g
 Y21vN397nMoiH6Lw1sRg0VHPSRCC+zBlakryF/y1XOyJ2AS59vpPeUXmihTxSWtw
 mm41+oCO7qk+zIAxU9vSWrWZNAJadlaI4exNWaeTDPSWVw+6hDyMC9fLUWEFeUlW
 g2OAoBToYbNvk5Gs2tg3voR+9FHAKEvRvkz7frH+CeZw7gEayWdedkKI8K9BSZ8C
 ypVThMFfFIj+jnxX5G4IFX8cO8dn2fmzPthsvgtF6e/8uccPBSfWkjY0hAEd/bXU
 pOA39aScIHbpWDay7h9PRtYQwnXJJ6B5uHgOZK6EBP3f8PvgFAJ1maHs0k2VSSMw
 vAuuxmQdbNckNmkEI3YlQ==
X-ME-Sender: <xms:auAGaDibzNPYLO7iLSadV00p5b3aiGIMy3HG9_AYZ50QNO52bdhBcg>
 <xme:auAGaACDKPEUeoLtZLOVQNAeURcV-E3auabY3cPCLFmT4SG5p-1taj2Sjbj8VGTv0
 oFiHziJTfO_bOrmCg>
X-ME-Received: <xmr:auAGaDEfUs-fmItG4QeOIKiYUQGFdNBVGkkrihg--M9kOBxssXgscFGX_pVfIzpIDUhwQBIZySKO3oPsL_vV9kd6knvg2TtQpMYaVjiOXNmRc8Rr>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvvdejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceo
 ihgrnhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefggeehudelle
 eggfevueehffefgeevieejiedtteduleeluefhjeeiudfhudffteenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvg
 gtrdhtvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht
 ohepjeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnse
 hrvghtrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:auAGaAS6DJLepdrp6OMXScVbAGTPbTr4QukAcoI8jGaEoDekxW3dDg>
 <xmx:auAGaAyQfs6T-tYG5nJUo9wUBO7df1xJAgPBkAVF7DoOgYtbUrax4g>
 <xmx:auAGaG65RFUIRKq5NnX-Vy9VYjg82PDrXbYI7QBuTrPDkT4B7CUzJg>
 <xmx:auAGaFxZ4dT9gAqvUr2qivSM6tIRxt4QY5CfoIDKS_70L5QF2fTpjQ>
 <xmx:auAGaNyYOTlW7-WVX7g7YZQc2cRVNpWtJ2j55uUXBNbJwjssDWpeSYa6>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 21 Apr 2025 20:18:50 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v4 2/2] gnu: set-xorg-configuration: Be smarter finding the
 display-manager.
Date: Mon, 21 Apr 2025 17:18:44 -0700
Message-ID: <20250422001845.20855-2-ian@HIDDEN>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250422001845.20855-1-ian@HIDDEN>
References: <20250422001845.20855-1-ian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/services/desktop.scm (desktop-services-for-system): Export.
* gnu/services/desktop.scm (set-xorg-configuration): Look for a
display-manager service in (desktop-services-for-system).
* gnu/services/desktop.scm (set-xorg-configuration): Remove TODO comment.

Change-Id: Iceda2d13d16435517cd92bcb49e6937ed096f392
---
 gnu/services/desktop.scm |  1 +
 gnu/services/xorg.scm    | 25 ++++++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index fe034cfa8f..f7fb3c5bf0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -199,6 +199,7 @@ (define-module (gnu services desktop)
             seatd-configuration
             seatd-service-type
 
+            desktop-services-for-system
             %desktop-services))
 
 ;;; Commentary:
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index c313b7bc59..8fff8fd491 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2023 muradm <mail@HIDDEN>
 ;;; Copyright © 2024 Zheng Junjie <873216071@HIDDEN>
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2025 Ian Eure <ian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@ (define-module (gnu services xorg)
   #:use-module (gnu system privilege)
   #:use-module (gnu services base)
   #:use-module (gnu services dbus)
+  #:use-module (gnu services desktop)
   #:use-module (gnu packages base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xorg)
@@ -139,6 +141,7 @@ (define-module (gnu services xorg)
             gdm-configuration
             gdm-service-type
 
+            xorg-configuration-service-type
             handle-xorg-configuration
             set-xorg-configuration))
 
@@ -1391,16 +1394,24 @@ (define gdm-service-type
                    "Run the GNOME Desktop Manager (GDM), a program that allows
 you to log in in a graphical session, whether or not you use GNOME."))))
 
-;; Since GDM depends on Rust and Rust is not available on all platforms,
-;; use SDDM as the fall-back display manager.
-;; TODO: Switch the condition to take into account if Rust is supported and
-;; match the configuration in desktop-services-for-system.
+(define (xorg-configuration-service? s)
+  "Returns #t if @var{s} is a service carrying xorg configuration."
+  (let ((val (service-value s)))
+    (and (record? val)
+         (memq 'xorg-configuration
+                 (record-type-fields (record-type-descriptor val))))))
+
+(define (xorg-configuration-service-type services)
+  "Return the service type of the first service in @var{services}
+which carries xorg configuration. "
+  (let ((lmst (find xorg-configuration-service? services)))
+    (when lmst (service-kind lmst))))
+
 (define* (set-xorg-configuration config
                                  #:optional
                                  (login-manager-service-type
-                                  (if (target-x86-64?)
-                                      gdm-service-type
-                                      sddm-service-type)))
+                                  (xorg-configuration-service-type
+                                   (desktop-services-for-system))))
   "Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an <xorg-configuration> record."
   (simple-service 'set-xorg-configuration
-- 
2.49.0





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 22 Apr 2025 00:19:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 20:19:04 2025
Received: from localhost ([127.0.0.1]:41195 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u71Lo-00064z-H7
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:19:04 -0400
Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]:47113)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u71Lj-00064J-9C
 for 77266 <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:18:59 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 199CF1140170;
 Mon, 21 Apr 2025 20:18:50 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Mon, 21 Apr 2025 20:18:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:reply-to
 :subject:subject:to:to; s=fm1; t=1745281130; x=1745367530; bh=7D
 QBBY9GAa/Cmr9PXdvmsPVYkQfFGi/GMhfkmwoOyDM=; b=YBtc8SXy8MiO9PrYkD
 JfnV082N0V6TLILrkOhxssQjrDybWoGDq9MiWRI6++racSNSHKFWc4NxRg0aCzlh
 6Nc9MgYoRTniWdyGKq9THE3chGuOMKNGTyyXt0fnjAtpXBzq4ANPX+yQul+0Ut+E
 hYH/tTF1a+5s5ahPQ5SoanCEHGZ0IoKRJSfWajW9A99nXfMOhUfA1FwCkX42l/IK
 CBOYtYzptGsrUfxp22WxaBmvYUawbq6Z7RPbLzXvYICeDGzTG5A0dnqBDkjUtfII
 SZPQn/iw0dEx+p+ZhdrN4xb2r1XdmCiCeY0osCw4P5U5uGNDR0gJ0wnTlhnibzF4
 iT3Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; t=1745281130; x=1745367530; bh=7DQBBY9GAa/Cmr9PXdvmsPVYkQfF
 Gi/GMhfkmwoOyDM=; b=oRzKKBe0zwLe4oPGyPXdFQVO3Ln1GWY2cjGCQ+kjGG/s
 smxhbmiKPUW7HfwH6zWONEXXchLP1Wf0Jh1zpHiYzHZDlTRC6Gb9vHkiwRhZ6RGq
 IWf1eQdNitnKFYN88+SlZC9vCENFj+TfzHThO4BJBizdsUJTf4PydNPeEpddgfs3
 8c3Dle9Tf1EpA0DFPmOamNc1ri6GmggdzdnJCZG39biLAWozGlf3Y/rMwIShO9v3
 z1s/oUyrv9bnC7AP6TumuPStKjwEoECMw7tS0MBR+bYzB6jv9FPwduA6HFW1CoqI
 VkntIgHp4g4yz73R6R91XDTEMIJvW4DOoXCpIuyy7g==
X-ME-Sender: <xms:aeAGaCkhwKh9eyC8G6_3VY2-u1r4uW_MtAkk3K7Nl0iFUkj20GssmQ>
 <xme:aeAGaJ0QW9_a67xUVblier0pst-cAMyu-C22r-MxOoCdHsSlDXXyvXffeDUiqbUJV
 _e6F3Fkz1oXEgtzwA>
X-ME-Received: <xmr:aeAGaAp5z1g2tRAH15Aimi2Ro_9LWHdUqTgiMMu5kjTdABvbXZPTIBrkXYmaZHx7ZnT398jTxd1aTK1DB7pAR-odJ0xz8tCA3LMy0VxHv5hUE77p>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvvdejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffogggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgr
 nhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefgueekffejudfgvd
 evteelteeitdeuuddufffhuefhiefhjeetuefhgfettedvteenucevlhhushhtvghrufhi
 iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrd
 htvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep
 jeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnsehrvg
 htrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:aeAGaGnxML3gDqJ374vUO5B6OM_OEZYWCnVIDKd8HHw5qv24aShKLw>
 <xmx:aeAGaA3kyl06MO99WynbUmjIC9Cpcr0YNPH-jvT9ZW0-l0k4GysgIQ>
 <xmx:aeAGaNtjKTtUEgsmkQZm2BZEHjG2A4bu4LXHcEmbPI1DCylULlWbUA>
 <xmx:aeAGaMXX18qjz6j9z_JKsB_5Ry0Mi4wEvLmRlSGsTI8H342mA-7h7w>
 <xmx:auAGaKXPaVOotydNKEDbtXaHBcsRWHK9UaLvYK9jY4bgJREpemkMim4G>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 21 Apr 2025 20:18:49 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v4 1/2] gnu: Merge xorg configurations when extending.
Date: Mon, 21 Apr 2025 17:18:43 -0700
Message-ID: <20250422001845.20855-1-ian@HIDDEN>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Configuration for xorg is embedded in the various display-manager
configuration records, and extension support is factored out into the
`handle-xorg-configuration' macro.  However, the extension mechanism replaces
the existing xorg-configuration with the supplied one, making it impossible to
compose configuration from multiple sources.  This patch adds a procedure to
merge two xorg-configuration records, and calls it within
handle-xorg-configuration, allowing the config to be built piecemeal.

* gnu/services/xorg.scm (merge-xorg-configurations): New variable.
(handle-xorg-configuration): Merge xorg configs.
* doc/guix.texi (X Window): Document xorg-configuration composition.

Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
---
 doc/guix.texi         | 48 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/xorg.scm | 42 ++++++++++++++++++++++++++++++-------
 2 files changed, 81 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index eebc1a1590..15e3192939 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -138,6 +138,7 @@ Copyright @copyright{} 2024 45mg@*
 Copyright @copyright{} 2025 Sören Tempel@*
 Copyright @copyright{} 2025 Rostislav Svoboda@*
 Copyright @copyright{} 2025 Zacchaeus@*
+Copyright @copyright{} 2025 Ian Eure@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -24916,8 +24917,51 @@ Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an @code{<xorg-configuration>} record.
 
 Since the Xorg configuration is embedded in the log-in manager's
-configuration---e.g., @code{gdm-configuration}---this procedure provides a
-shorthand to set the Xorg configuration.
+configuration---e.g., @code{gdm-configuration}---this procedure provides
+a shorthand to set the Xorg configuration.
+
+In addition to @code{set-xorg-configuration}, you may extend your log-in
+manager’s service-type to provide reusable, partial configurations,
+which are concatenated to create the final Xorg configuration:
+
+@lisp
+;; A service which configures Intel video drivers.
+(define %xorg-intel-service
+  (simple-service
+   'xorg-intel
+   gdm-service-type
+   (xorg-configuration
+    (modules (list xf86-video-intel))
+    (drivers '("intel"))
+    (extra-config "
+    Section \"Device\"
+        Identifier \"Intel GPU\"
+        Driver \"intel\"
+        Option \"TearFree\" \"true\"
+    EndSection"))))
+
+;; A service which configures the keyboard.
+(define %xorg-keyboard-service
+  (simple-service
+   'xorg-keyboard
+   gdm-service-type
+   (xorg-configuration
+    (keyboard-layout
+     (keyboard-layout "us" #:options '("ctrl:nocaps"))))))
+
+(operating-system
+  (services
+   (append
+    (list (service gdm-service-type)
+          %xorg-intel-service
+          %xorg-keyboard-service)
+    %base-services))
+  @dots{})
+@end lisp
+
+Service extension and @code{set-xorg-configuration} can each be used
+seperately, or in conjunction.
+
 @end deffn
 
 @deffn {Procedure} xorg-start-command [config]
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index bef05b9bb9..c313b7bc59 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration>
   (server-arguments xorg-configuration-server-arguments ;list of strings
                     (default %default-xorg-server-arguments)))
 
+(define (merge-xorg-configurations a b)
+  (let ((configs (list b a)))           ; Prefer later configurations.
+    (xorg-configuration
+     (modules
+      (delete-duplicates (append-map xorg-configuration-modules configs)))
+     (fonts
+      (delete-duplicates (append-map xorg-configuration-fonts configs)))
+     (drivers
+      (delete-duplicates (append-map xorg-configuration-drivers configs)))
+     (resolutions
+      (delete-duplicates (append-map xorg-configuration-resolutions configs)))
+     (extra-config (append-map xorg-configuration-extra-config configs))
+     ;; Prefer the more recently set layout.
+     (keyboard-layout (or (xorg-configuration-keyboard-layout b)
+                          (xorg-configuration-keyboard-layout a)
+                          #f))
+     (server
+      ;; Prefer the non-default server.
+      (if (eq? xorg-server (xorg-configuration-server a))
+          (xorg-configuration-server b)
+          (xorg-configuration-server a)))
+     (server-arguments
+      ;; Prefer the non-default arguments.
+      (if (eq? %default-xorg-server-arguments
+             (xorg-configuration-server-arguments a))
+          (xorg-configuration-server-arguments b)
+          (xorg-configuration-server-arguments a))))))
+
 (define (xorg-configuration->file config)
   "Compute an Xorg configuration file corresponding to CONFIG, an
 <xorg-configuration> record."
@@ -334,9 +362,12 @@ (define (expand modules)
                            port)
                   (newline port)))
 
-              (for-each (lambda (config)
-                          (display config port))
-                        '#$(xorg-configuration-extra-config config))))))
+              (for-each
+               (lambda (config)
+                 (display config port)
+                 (newline port))
+               (delete-duplicates
+                '#$(xorg-configuration-extra-config config)))))))
 
     (computed-file "xserver.conf" build)))
 
@@ -628,10 +659,7 @@ (define-syntax handle-xorg-configuration
     ((_ configuration-record service-type-definition)
      (service-type
        (inherit service-type-definition)
-       (compose (lambda (extensions)
-                  (match extensions
-                    (() #f)
-                    ((config . _) config))))
+       (compose (cut reduce merge-xorg-configurations #f <>))
        (extend (lambda (config xorg-configuration)
                  (if xorg-configuration
                      (configuration-record
-- 
2.49.0





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 22 Apr 2025 00:15:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 20:15:42 2025
Received: from localhost ([127.0.0.1]:41157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u71Ib-0005uW-Lq
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:15:42 -0400
Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]:58389)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u71IX-0005tq-T5
 for 77266 <at> debbugs.gnu.org; Mon, 21 Apr 2025 20:15:38 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfhigh.phl.internal (Postfix) with ESMTP id AD3AC114019C;
 Mon, 21 Apr 2025 20:15:32 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Mon, 21 Apr 2025 20:15:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:reply-to
 :subject:subject:to:to; s=fm1; t=1745280932; x=1745367332; bh=ck
 4s4eR1TpP49rOzk1CSgWCki/j5Kyyq35rNafIqXMo=; b=p/MdxBgGRratK4qlda
 tqaDkxNxUVcIfT7n8m+KqOGO9a+vF350hucLGtaZBmW7So5uFfCjnGg1EAGIgG32
 rKsaYTK+bigleTN1ewG/aIHplFTTfInEDLyYWwrrjA0JGE5FT/sjJZTmGf2MbBVV
 DUHngEUaRMCzrBJPzKFEcHAFR+tgHvMpOgGT1WALmjx17ahQW0Amu7Z+JXOuvyRa
 kA6PeE4oVF7U92EhBs4g/RrJIG8QnYglze42MxYI/tfjJ7+AP0mJLxL5yQHq/RTM
 TkVxlmi6h9bD3bHz82DtdqBSOAuNUNtVEeQ7A3O190FiZS1CO1RtbYyUfC1sgYah
 o/hA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; t=1745280932; x=1745367332; bh=ck4s4eR1TpP49rOzk1CSgWCki/j5
 Kyyq35rNafIqXMo=; b=Av844Z68TfzeYWLQEIcobvayBNYg5n1V8kz0sy8KBfzZ
 MvihRRPrlGV9FWg0TGFzZPDywPLQCOsDVyUMt/luSf0WSTiewe+v8EOoZQlc6liw
 lSI760gW7QXj58YbInPj6d/ttGGX/1o2SGRClw8bGVNDRax3kB2nJ8D8A8Iin8gO
 RwC43q+eufM0Cc7bDalYbhgxe5UV4pi6R5kB7KY6NOrfRiJkyfZuRrJT2nNuBsjh
 P2WVtF3gr9CYemzBF1Py537UpY4Nl9qVXYK2dkE4CXBQhHGGLicZXXwVYDVepGoM
 KTjODQUsrpavj6t264iZINS3pXJtkQUc/jjyLkPcfw==
X-ME-Sender: <xms:pN8GaBrFPVjY1cLO1xNCz-UcxzjfYPW8W5y9TId857uUlrVUqatR_w>
 <xme:pN8GaDpkUJkL7DqMFVBesZ5BhLTrir1t7YuYec06jF5h5PKiYUgJLbRKBJL87namw
 klnXBbjZTEVHAFzSA>
X-ME-Received: <xmr:pN8GaOMgHypzsNThxuccoQYEx5vvuvofH8PRl8Wvf7mmUXvExOJ_AE0etvnWx29XKNvwcfleyG3W6jTPF5LVGjYmI3aL9Pfo6NP6>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvgedvvdeiucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefufgffkfggtgfgsehtqhertddtreej
 necuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvheqne
 cuggftrfgrthhtvghrnheptdetkeffffefiefhueekvdeiueegieegffdthfelveelgfdt
 vdfhtdduheffuedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopedvpdhm
 ohguvgepshhmthhpohhuthdprhgtphhtthhopeejjedvieeiseguvggssghughhsrdhgnh
 hurdhorhhgpdhrtghpthhtoheplhhuughosehgnhhurdhorhhg
X-ME-Proxy: <xmx:pN8GaM5e9Fa9U3FNQWJCAM3dAty_PK3tnG2AkTdHjFsSEoEENEc-LA>
 <xmx:pN8GaA42Zdmxr5K1RT_ZvMXyvym-42EgWWMbylc-FS4UZdft70R2gg>
 <xmx:pN8GaEg0d_gA3KuKRZ7G3O_JCQbPEIEbrna6_IoDa2zCeNSvVTvB7Q>
 <xmx:pN8GaC6Et_j3ReVnH8mkFbTR5Q6_i8ax6YcVm-37vLc5zGc7E1sMkA>
 <xmx:pN8GaPQsQSvA0WpWU1jI_ov0Di4GEryRWPbPs6GXyVCGw72MO-uFSS9R>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 21 Apr 2025 20:15:31 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH v3 1/2] gnu: Merge xorg configurations when
 extending.
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Mon, 21 Apr 2025 17:15:31 -0700
Message-ID: <87h62hhx0c.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi,
>
> Ian Eure <ian@HIDDEN> writes:
>
>> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
>> +   (append
>> +       (list (service gdm-service-type)
>> +          %xorg-intel-service
>> +          %xorg-keyboard-service)
>
> Nitpick: indentation is off.  :-)

Do you have / know of a setup for editing Guile inside the=20
documentation?  I=E2=80=99ve been editing in a *scheme* scratch buffer in=20
Emacs and pasting back into the docs, but this clearly doesn=E2=80=99t=20
work very well.


> I think =E2=80=98delete-duplicates=E2=80=99 should be used for drivers, m=
odules,=20
> and
> fonts, but not for =E2=80=98extra-config=E2=80=99 (which is merely a stri=
ng).
>
> Does that make sense?

Makes perfect sense, updated patch coming soon.

Thanks,
  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 21 Apr 2025 22:17:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 18:17:42 2025
Received: from localhost ([127.0.0.1]:40444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6zSQ-0003Ws-7f
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 18:17:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40092)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1u6zS7-0003Vj-VD
 for 77266 <at> debbugs.gnu.org; Mon, 21 Apr 2025 18:17:24 -0400
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 <ludo@HIDDEN>)
 id 1u6zS1-0006AR-O6; Mon, 21 Apr 2025 18:17:17 -0400
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=xeYi59Ad9iAbL7Sg+7LVoQ1w2VbMSRisrthr2PSn3Ww=; b=YoDtW2Qdm8lhtOER49mQ
 zXSwwYXXWDeAY9S+SrKp4IpSd8BAmvi7tv1DeS9f1lxZT8q+lzCHublhFU8o3KzRGH7GON8hOwy4Y
 soOSRHrqxPDJ2NZzdAUsBFPDBBPNYrcCh1jmCVTGecpfP3vj8gC7PEFd2F+oDVssUhrG70krHLFi4
 O2r3tWpvHM4te+LImwItRQ1ZzdVaiPJgPHVDz/0nEiXb/t5ZCXf/OS5RxhSF4vWyvTHP2769t9asu
 YNkTT1HMu1+o78hroK0eaad5dyagpWgtNQvLgTP6rwWgxCXS0SrIrkNlmkg6vFlNUbidts5eT+zEo
 dWQ+czJg40zW2Q==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ian Eure <ian@HIDDEN>
Subject: Re: [bug#77266] [PATCH v3 1/2] gnu: Merge xorg configurations when
 extending.
In-Reply-To: <20250420062123.22442-2-ian@HIDDEN> (Ian Eure's message of
 "Sat, 19 Apr 2025 23:21:20 -0700")
References: <20250420062123.22442-1-ian@HIDDEN>
 <20250420062123.22442-2-ian@HIDDEN>
Date: Tue, 22 Apr 2025 00:12:42 +0200
Message-ID: <871ptl410l.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Ian Eure <ian@HIDDEN> writes:

> Configuration for xorg is embedded in the various display-manager
> configuration records, and extension support is factored out into the
> `handle-xorg-configuration' macro.  However, the extension mechanism repl=
aces
> the existing xorg-configuration with the supplied one, making it impossib=
le to
> compose configuration from multiple sources.  This patch adds a procedure=
 to
> merge two xorg-configuration records, and calls it within
> handle-xorg-configuration, allowing the config to be built piecemeal.
>
> * gnu/services/xorg.scm (merge-xorg-configurations): New variable.
> (handle-xorg-configuration): Merge xorg configs.
> * doc/guix.texi (X Window): Document xorg-configuration composition.
>
> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
> +   (append
> +       (list (service gdm-service-type)
> +          %xorg-intel-service
> +          %xorg-keyboard-service)

Nitpick: indentation is off.  :-)

>  (define (xorg-configuration->file config)
>    "Compute an Xorg configuration file corresponding to CONFIG, an
>  <xorg-configuration> record."
> @@ -334,9 +362,12 @@ (define (expand modules)
>                             port)
>                    (newline port)))
>=20=20
> -              (for-each (lambda (config)
> -                          (display config port))
> -                        '#$(xorg-configuration-extra-config config))))))
> +              (for-each
> +               (lambda (config)
> +                 (display config port)
> +                 (newline port))
> +               (delete-duplicates
> +                '#$(xorg-configuration-extra-config config)))))))

I think =E2=80=98delete-duplicates=E2=80=99 should be used for drivers, mod=
ules, and
fonts, but not for =E2=80=98extra-config=E2=80=99 (which is merely a string=
).

Does that make sense?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 20 Apr 2025 06:21:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 02:21:56 2025
Received: from localhost ([127.0.0.1]:43815 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6O3v-0001sb-Eu
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:56 -0400
Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:50223)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u6O3j-0001rL-1d
 for 77266 <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:44 -0400
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfout.phl.internal (Postfix) with ESMTP id E4F191380140;
 Sun, 20 Apr 2025 02:21:37 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Sun, 20 Apr 2025 02:21:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745130097;
 x=1745216497; bh=JGFo5qv/1WpDTrzYe0NHP9lNdrRkNTESdadqX3EABng=; b=
 EgCA7Ce7KgL8tCqxzoFvpOMhxahs0WVWcoW8ZuJvrhZAzwU3EQKu/f4V3b3JsZJw
 mxU8QeJUtGkjTjEvNEEgMyVQIulJ7wNVYT/aL2WoKVOiiNurccsNFwVCOOqLAzhh
 XPjoM4F0HSH2AxH7yj1QuT2s63lK2/7052kIG4TijtW8Fdcw+5qT8Z8HjBJaG0lZ
 2pET5okJ5vk6mkxOJ5U7RMqtRZuX+YwpaDSKDreGZjQSsr9Aipognpnl+60ob+d0
 OE/NrLp0mTpmNoaJUHBttiMKc35CKJCH/RPPWtOJRA1GZNlIkzI2rkmny/DnYYck
 gcMGa+q6YD2b7ycuGHaIHA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1745130097; x=
 1745216497; bh=JGFo5qv/1WpDTrzYe0NHP9lNdrRkNTESdadqX3EABng=; b=t
 OxPKGcy4HNqS2hEPtEW3RRoSMQZ9VxQExTFS13mAG7+GpCzH18AUoKN7PInMhoxu
 ej3rBl0le6x/RMOcJwrf6VUjkRIZVDSJqBBkMidRu1vndP094w+ip40oT3t5si9o
 3ZL07yAm637Newrx3oa9ZT4GQo6AZh35rIMrAFblTRpb9KiE6WrIKo94Q52pxncu
 kHr4W+7kZppmp+rUpc1VRO27m794m4Zgjz/39u39U+iDVgGI7yYG28j2DETGU3RY
 p9Pale/1U5O4cdBvPF1WpUqn0gGJq42awDx6c72I1UCQofhVi+m8hdn6o+83qYsW
 yMmi/0N5R0W4FIiLRH8Sg==
X-ME-Sender: <xms:cZIEaIgoV4YNkdW61JxtNMROJwZCEgT9kQSPUEL_5Q5crhC5925n9w>
 <xme:cZIEaBCO3BYtpD8OJgR7sdp_HhbRqQ9WAI1NI9oTEgCJ4nGd-gGNgkWYozQxQttSn
 WFNMFQ5wfZev4XQrw>
X-ME-Received: <xmr:cZIEaAE1q7G6-pYAX7ZLsdxOUgPJtK_wNoY50B8XZQe-q4GTR9WP-7JFzd0XWiXS5wb3qpv7954coSNqB0LM5VuqelcEJjuGScDD5nQ8td7Oww>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeejudejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceo
 ihgrnhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefggeehudelle
 eggfevueehffefgeevieejiedtteduleeluefhjeeiudfhudffteenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvg
 gtrdhtvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht
 ohepjeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnse
 hrvghtrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:cZIEaJTjU3djFxJGJisnSib1xa16ush94PKpAz0qmFRtgfUyM_cCtw>
 <xmx:cZIEaFyi4o3OULDwXlRnHfZMAWkOkM2tQ8v0jm5GW7w55hKZZcfluQ>
 <xmx:cZIEaH5lFP3i4HRzSKlXOOwCwxnNENvqTDZaD1LPIwGRXZlY25ivMA>
 <xmx:cZIEaCz8o1v1YWeV26pct1qSDaki4R_ju5vtdW05K_WT-URDg5Ix_w>
 <xmx:cZIEaKyZpJ9UPkYdjreDbyPsRJGjiso5qcFN5JRaRL_MeWR9PyJ9w2qq>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 20 Apr 2025 02:21:37 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v3 2/2] gnu: set-xorg-configuration: Be smarter finding the
 display-manager.
Date: Sat, 19 Apr 2025 23:21:21 -0700
Message-ID: <20250420062123.22442-3-ian@HIDDEN>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250420062123.22442-1-ian@HIDDEN>
References: <20250420062123.22442-1-ian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/services/desktop.scm (desktop-services-for-system): Export.
* gnu/services/desktop.scm (set-xorg-configuration): Look for a
display-manager service in (desktop-services-for-system).
* gnu/services/desktop.scm (set-xorg-configuration): Remove TODO comment.

Change-Id: Iceda2d13d16435517cd92bcb49e6937ed096f392
---
 gnu/services/desktop.scm |  1 +
 gnu/services/xorg.scm    | 25 ++++++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index fe034cfa8f..f7fb3c5bf0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -199,6 +199,7 @@ (define-module (gnu services desktop)
             seatd-configuration
             seatd-service-type
 
+            desktop-services-for-system
             %desktop-services))
 
 ;;; Commentary:
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index cb933693b7..4aec265098 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2023 muradm <mail@HIDDEN>
 ;;; Copyright © 2024 Zheng Junjie <873216071@HIDDEN>
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2025 Ian Eure <ian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@ (define-module (gnu services xorg)
   #:use-module (gnu system privilege)
   #:use-module (gnu services base)
   #:use-module (gnu services dbus)
+  #:use-module (gnu services desktop)
   #:use-module (gnu packages base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages xorg)
@@ -139,6 +141,7 @@ (define-module (gnu services xorg)
             gdm-configuration
             gdm-service-type
 
+            xorg-configuration-service-type
             handle-xorg-configuration
             set-xorg-configuration))
 
@@ -1391,16 +1394,24 @@ (define gdm-service-type
                    "Run the GNOME Desktop Manager (GDM), a program that allows
 you to log in in a graphical session, whether or not you use GNOME."))))
 
-;; Since GDM depends on Rust and Rust is not available on all platforms,
-;; use SDDM as the fall-back display manager.
-;; TODO: Switch the condition to take into account if Rust is supported and
-;; match the configuration in desktop-services-for-system.
+(define (xorg-configuration-service? s)
+  "Returns #t if @var{s} is a service carrying xorg configuration."
+  (let ((val (service-value s)))
+    (and (record? val)
+         (memq 'xorg-configuration
+                 (record-type-fields (record-type-descriptor val))))))
+
+(define (xorg-configuration-service-type services)
+  "Return the service type of the first service in @var{services}
+which carries xorg configuration. "
+  (let ((lmst (find xorg-configuration-service? services)))
+    (when lmst (service-kind lmst))))
+
 (define* (set-xorg-configuration config
                                  #:optional
                                  (login-manager-service-type
-                                  (if (target-x86-64?)
-                                      gdm-service-type
-                                      sddm-service-type)))
+                                  (xorg-configuration-service-type
+                                   (desktop-services-for-system))))
   "Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an <xorg-configuration> record."
   (simple-service 'set-xorg-configuration
-- 
2.49.0





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 20 Apr 2025 06:21:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 02:21:46 2025
Received: from localhost ([127.0.0.1]:43809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6O3l-0001s2-W2
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:46 -0400
Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:60297)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u6O3h-0001rF-HU
 for 77266 <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:43 -0400
Received: from phl-compute-07.internal (phl-compute-07.phl.internal
 [10.202.2.47])
 by mailfout.phl.internal (Postfix) with ESMTP id DA85913800DF;
 Sun, 20 Apr 2025 02:21:35 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-07.internal (MEProxy); Sun, 20 Apr 2025 02:21:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:message-id:mime-version:reply-to:subject:subject:to
 :to; s=fm1; t=1745130095; x=1745216495; bh=ccDtdetuyzRnR+l/+OeZK
 vpYsHpTN8qOe3LGrUSFpL0=; b=HaMi3pSe9E7hWXSzvYCo0M2VjYxEgKId+yzQv
 MJzW1s72M7l9WkfTc/pmW3/IAreeIE3flxeKjVhTJwt2emJWH38RxH3XGixLgiNk
 /d96rZYVG6Mc0E6exaT8XBPokyFRlAAXd6z+2BJKYV6DBzojrKr4exkRpyZUw0kJ
 zrRsmDoEMR5rvsgvag3mHyipUfOfizzM+9h18QYjF0/bzmyAksZmiKwQOfxT6J23
 elzmslpbNoP2/TF6R7OHZjqarVEHfRqgW2fTnfzgiLcTQh9klwqgF9Emvm9JYLHP
 BfpJi3NbQrlCt6A/qsxStOfz+MYIHWV1HtF3xrsUdHuREmkFg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:message-id:mime-version:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1745130095; x=1745216495; bh=ccDtdetuyzRnR+l/+OeZKvpYsHpTN8qOe3L
 GrUSFpL0=; b=bsYyEUQfG9yjLLlBrjHOqGDoaptOSfeuZHGsFUn5XLIr7BC5fcW
 hpJLrguRPTXXhFwiEwaxgsNJRzxJBGFqreXq1fr0atufERrgUxIg0CI1YbEejtzs
 KUGYrdAgSl+8zZ5NSVMG8/D4+w4aTVDxk8SYGkqnUTUp2E09CCKa4qeepDru9zFF
 12dsr3Ji0y5B2FsIOSAlYr8nDtEqD7jIOhKeeXT6e9KsdMKayC4xbVnjdJkN8iH4
 CGdZ2ou2V+XJ2dqENWYA9xqHPC70Z3OijLzjaNiiReFPsqipEQPF5iQi9rme4Kl+
 o8+ZkhksgsdutU+2bpAiwT4gm8vYq3b8ecg==
X-ME-Sender: <xms:b5IEaAq3OEaghF2mR1xxetxjGY8YpuXa_bar2nAeXwOKS44sCmohEA>
 <xme:b5IEaGoHx4vVEATsxOtFo_avcH3p2hZ6C2V65wxPve8zcg0pC1sbSuJwWL_HaDWf3
 or6eKQbbyC0ztvYhA>
X-ME-Received: <xmr:b5IEaFO8fw3cPB1JFBx2wrbTcd8d7Hh9U3QbpT1qhrkqAiKyONmVgSeg-O42KMcB0FYxdi-o1PjjAszSlCNh6UYaP_U9RI-TkFL1-6LRbbVDgQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeejudejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghn
 sehrvghtrhhoshhpvggtrdhtvheqnecuggftrfgrthhtvghrnhephfeiveeliedukeffhe
 fhleeijedtveelleetgefggfehkeeljeehtdeguddvvefgnecuvehluhhsthgvrhfuihii
 vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrth
 hvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeej
 jedvieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepihgrnhesrhgvth
 hrohhsphgvtgdrthhv
X-ME-Proxy: <xmx:b5IEaH4t_V0CBEZosQse6JwfcPkISpRFYFwE0UNe7FPS2-0EIThN6g>
 <xmx:b5IEaP5WF-xgoqdo3kKvXOgs053yHg85U1IssUrlS2HXylvPS3yf2A>
 <xmx:b5IEaHjaJnWKs4UwFqNTpB5fyLQOy1zwGGBPnBGiUjv5cJxaVXKSOw>
 <xmx:b5IEaJ5mELNj1FaTY1LaTvJxAo9-QsNi9fm252shMjcsdey08N9tow>
 <xmx:b5IEaN4wDDnG8EdKBwuXJTh6y6d96v1kWyDtUgNMJS_RvKuJMja5fL29>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 20 Apr 2025 02:21:34 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v3 0/2] gnu: Merge xorg configurations when extending.
Date: Sat, 19 Apr 2025 23:21:19 -0700
Message-ID: <20250420062123.22442-1-ian@HIDDEN>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

I reworded the documentation, and improved the example.

While I was in here, I also fixed the TODO on `set-xorg-configuration'.
Rather than assuming gdm on x86 and sddm on everything else, it now looks up
the service-type containing xorg configuration with
`desktop-services-for-system'.

Ian Eure (2):
  gnu: Merge xorg configurations when extending.
  gnu: set-xorg-configuration: Be smarter finding the display-manager.

 doc/guix.texi            | 49 +++++++++++++++++++++++++++--
 gnu/services/desktop.scm |  1 +
 gnu/services/xorg.scm    | 67 +++++++++++++++++++++++++++++++---------
 3 files changed, 101 insertions(+), 16 deletions(-)

-- 
2.49.0





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 20 Apr 2025 06:21:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 02:21:45 2025
Received: from localhost ([127.0.0.1]:43807 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6O3l-0001rv-Bo
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:45 -0400
Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:50091)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u6O3i-0001rH-6a
 for 77266 <at> debbugs.gnu.org; Sun, 20 Apr 2025 02:21:43 -0400
Received: from phl-compute-12.internal (phl-compute-12.phl.internal
 [10.202.2.52])
 by mailfout.phl.internal (Postfix) with ESMTP id 08D5A13800EF;
 Sun, 20 Apr 2025 02:21:37 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-12.internal (MEProxy); Sun, 20 Apr 2025 02:21:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1745130097;
 x=1745216497; bh=JlsQTN9bjc6RKKbJU+j1LxeoSX3acM7Z/LKbZGCX1q8=; b=
 g15tpMoWfDmB9hovC4K/wJPDfBSt6Y2o+x1E5RTIBvfX3Avn25hLWXh+Chv5HCSz
 f+FICBevogJuUE3DxzQHxidPkStCXU0J6R+ajSQrwYX198aKzQ/2stRnrcrCknBt
 e9c1OYkNKxaTr2BlQAfRpWtsu23geFykH+kKC7wqOqxKeM1CsiIdeH2nP5g41RBa
 ceQgMa9LwodZaCw5UjrpubKOTf4nxTLf/kaN1hWgu/4cCmj84+TWB8qlxUYvmFTV
 pedErtqbJPNVXNltYN5SYHnLNmxMAuvCloE95l/rlyMEnczd1UK5O+JvAhUdBArq
 JXWw9WzyC/In8meHyLwMUA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1745130097; x=
 1745216497; bh=JlsQTN9bjc6RKKbJU+j1LxeoSX3acM7Z/LKbZGCX1q8=; b=Z
 WkPISXgtPS6/N8T+DvUwgT+Jddx0uSWuJdXwbPbt2qv3e4368jOOZM7XjlFBCea/
 EiMpR1rEJn+AlAIU9oa5Dy4lD0r99Nm+E9shVcXxO684s6e9dPYRJ3KtP+5cMf3/
 kXvdFZxJ6I5jifA9UtHEoAGGeu2n7ANTFV4r24lxZ10A/lwyNS9sICQPgZ2igzMx
 S/rc3z0uxEnOsyaZl8CNiMBFOTR15lElSzdRaiCaeXn/y43v3eR1C8pjfCHnLgzv
 SYAz04HkJvGzj3pNvnClWNoGH0uX5izE/FZmPWs6AUi3D2UL/n4HaEwPepRSIC6z
 /rUNFeYhFQIkoJScNcOEw==
X-ME-Sender: <xms:cJIEaBtvwcmPCMzE_YS6YygLoikG7K9hcVnwq20SdqJTPtxN8FxdTA>
 <xme:cJIEaKesCNALGAFoRjQ-j3raMHu43-WcQtIT_mQRsa8nKRhjs_nSp0__HucwtB4Qz
 6345q_-0pZ0mZnOMA>
X-ME-Received: <xmr:cJIEaEzlI1Irr6C47tjcPqpw9vxfhblVHUhZpMxP_wcCtZzOKrOAYXPyMR44CoFtQ0TU6LtmCLTIeO9Ay3M1BReNhMhJDdh8hxvP2EzEHUadVQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeejudejucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceo
 ihgrnhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefggeehudelle
 eggfevueehffefgeevieejiedtteduleeluefhjeeiudfhudffteenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvg
 gtrdhtvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht
 ohepjeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnse
 hrvghtrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:cJIEaINVPshHFH8NrEvv3uh6OD6tWi-OLuLYoBjxpa8Sl22ampS4FA>
 <xmx:cJIEaB_fZe7yIeolAFSnc1DavCtzR5TN2YTjSSnNoBC6tnYo-A6ZiA>
 <xmx:cJIEaIV2UBt9r9ZWVe6tzPSTYe_emhzGH1QpWAvUh1_p-2xrHxglMw>
 <xmx:cJIEaCeG9_Zdoh0PtnjBXqL0zMfCk19LSu8KvvMZxNMO-3CzOamRVA>
 <xmx:cJIEaMeUp6yda6oCY07emzT9rP4PYJcej7um12X_b5KfpnxvVWYxo2AU>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 20 Apr 2025 02:21:36 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v3 1/2] gnu: Merge xorg configurations when extending.
Date: Sat, 19 Apr 2025 23:21:20 -0700
Message-ID: <20250420062123.22442-2-ian@HIDDEN>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250420062123.22442-1-ian@HIDDEN>
References: <20250420062123.22442-1-ian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Configuration for xorg is embedded in the various display-manager
configuration records, and extension support is factored out into the
`handle-xorg-configuration' macro.  However, the extension mechanism replaces
the existing xorg-configuration with the supplied one, making it impossible to
compose configuration from multiple sources.  This patch adds a procedure to
merge two xorg-configuration records, and calls it within
handle-xorg-configuration, allowing the config to be built piecemeal.

* gnu/services/xorg.scm (merge-xorg-configurations): New variable.
(handle-xorg-configuration): Merge xorg configs.
* doc/guix.texi (X Window): Document xorg-configuration composition.

Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
---
 doc/guix.texi         | 49 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/xorg.scm | 42 ++++++++++++++++++++++++++++++-------
 2 files changed, 82 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index eebc1a1590..02150eb497 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -138,6 +138,7 @@ Copyright @copyright{} 2024 45mg@*
 Copyright @copyright{} 2025 Sören Tempel@*
 Copyright @copyright{} 2025 Rostislav Svoboda@*
 Copyright @copyright{} 2025 Zacchaeus@*
+Copyright @copyright{} 2025 Ian Eure@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -24916,8 +24917,52 @@ Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an @code{<xorg-configuration>} record.
 
 Since the Xorg configuration is embedded in the log-in manager's
-configuration---e.g., @code{gdm-configuration}---this procedure provides a
-shorthand to set the Xorg configuration.
+configuration---e.g., @code{gdm-configuration}---this procedure provides
+a shorthand to set the Xorg configuration.
+
+In addition to @code{set-xorg-configuration}, you may extend your log-in
+manager’s service-type to provide reusable, partial configurations,
+which are concatenated to create the final Xorg configuration:
+
+@lisp
+;; A service which configures Intel video drivers.
+(define %xorg-intel-service
+  (simple-service
+   'xorg-intel
+   gdm-service-type
+   (xorg-configuration
+    (modules (list xf86-video-intel))
+    (drivers '("intel"))
+    (extra-config
+    "
+    Section \"Device\"
+        Identifier \"Intel GPU\"
+        Driver \"intel\"
+        Option \"TearFree\" \"true\"
+    EndSection"))))
+
+;; A service which configures the keyboard.
+(define %xorg-keyboard-service
+  (simple-service
+   'xorg-keyboard
+   gdm-service-type
+   (xorg-configuration
+    (keyboard-layout
+     (keyboard-layout "us" #:options '("ctrl:nocaps"))))))
+
+(operating-system
+  (services
+   (append
+       (list (service gdm-service-type)
+          %xorg-intel-service
+          %xorg-keyboard-service)
+    %base-services))
+  @dots{})
+@end lisp
+
+Service extension and @code{set-xorg-configuration} can each be used
+seperately, or in conjunction.
+
 @end deffn
 
 @deffn {Procedure} xorg-start-command [config]
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index bef05b9bb9..cb933693b7 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration>
   (server-arguments xorg-configuration-server-arguments ;list of strings
                     (default %default-xorg-server-arguments)))
 
+(define (merge-xorg-configurations a b)
+  (let ((configs (list b a)))           ; Prefer later configurations.
+    (xorg-configuration
+     (modules
+      (append-map xorg-configuration-modules configs))
+     (fonts
+      (append-map xorg-configuration-fonts configs))
+     (drivers
+      (append-map xorg-configuration-drivers configs))
+     (resolutions
+      (append-map xorg-configuration-resolutions configs))
+     (extra-config (append-map xorg-configuration-extra-config configs))
+     ;; Prefer the more recently set layout.
+     (keyboard-layout (or (xorg-configuration-keyboard-layout b)
+                          (xorg-configuration-keyboard-layout a)
+                          #f))
+     (server
+      ;; Prefer the non-default server.
+      (if (eq? xorg-server (xorg-configuration-server a))
+          (xorg-configuration-server b)
+          (xorg-configuration-server a)))
+     (server-arguments
+      ;; Prefer the non-default arguments.
+      (if (eq? %default-xorg-server-arguments
+             (xorg-configuration-server-arguments a))
+          (xorg-configuration-server-arguments b)
+          (xorg-configuration-server-arguments a))))))
+
 (define (xorg-configuration->file config)
   "Compute an Xorg configuration file corresponding to CONFIG, an
 <xorg-configuration> record."
@@ -334,9 +362,12 @@ (define (expand modules)
                            port)
                   (newline port)))
 
-              (for-each (lambda (config)
-                          (display config port))
-                        '#$(xorg-configuration-extra-config config))))))
+              (for-each
+               (lambda (config)
+                 (display config port)
+                 (newline port))
+               (delete-duplicates
+                '#$(xorg-configuration-extra-config config)))))))
 
     (computed-file "xserver.conf" build)))
 
@@ -628,10 +659,7 @@ (define-syntax handle-xorg-configuration
     ((_ configuration-record service-type-definition)
      (service-type
        (inherit service-type-definition)
-       (compose (lambda (extensions)
-                  (match extensions
-                    (() #f)
-                    ((config . _) config))))
+       (compose (cut reduce merge-xorg-configurations #f <>))
        (extend (lambda (config xorg-configuration)
                  (if xorg-configuration
                      (configuration-record
-- 
2.49.0





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 19 Apr 2025 19:07:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 15:07:55 2025
Received: from localhost ([127.0.0.1]:37521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6DXd-0002LM-MD
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 15:07:55 -0400
Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:34403)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u6DXZ-0002Kq-63
 for 77266 <at> debbugs.gnu.org; Sat, 19 Apr 2025 15:07:51 -0400
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.phl.internal (Postfix) with ESMTP id 053EB13801C2;
 Sat, 19 Apr 2025 15:07:44 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Sat, 19 Apr 2025 15:07:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:reply-to
 :subject:subject:to:to; s=fm1; t=1745089664; x=1745176064; bh=Px
 IePsRbjem3gwqAHajE/F0BGS+Q3iKly1ZVNwuOFHM=; b=fFj6M87foVfS4FR1cl
 tv5OwiFnjf/zs6EdI3DzCLl9yL8IwQm9uSbYeUjeJRhgf3Zf764e/kXbZtczaJhd
 EqyuEmO381QJA6BZXrzm+SDYjPbNN+LTGKLX3fOvDaFcc8tVvVQwotiJ4bPgSTC2
 kf/M0c47sISDPeufFGhn6JzHx5gNaGCgHjjTV4cXDvWyeo2czRDBsi6DhPIhONuJ
 2XnXBqfRzCA9vwLYEZ5G4fO6QRSzGuVWYiWTmcXWarBXoRkc5eknYGg/wUSY9ucS
 /UTDIcYBo0j4FkmVubdVYffaT+NTa5IsTZlK10PHf/yd6LOU53nDPxmUTpEL8kqX
 e8lg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; t=1745089664; x=1745176064; bh=PxIePsRbjem3gwqAHajE/F0BGS+Q
 3iKly1ZVNwuOFHM=; b=d88lWW4FXlkZgaXy/GEZHLRoRXktEbAorYSM6yYaiSzc
 s50mKwFwY5pgy8mOPrwar1tpKHR6eZjIxfNZWPGu5f3dZpfCGQ6W3hTJEgensIKe
 2mGoTcWNxERKrehnkKw+8j1hK1WYNYFBsWO5AWmtvWpQCjAZ3Ks8hCg4GPR3DIba
 7HUJY0GTcvqrU8R/ZtWoWq1Vh3pHv99WPwIV3kC89v/Vunyyb/E49SMjb0kW2e5g
 IVE55YBdGtTRU4oL9JtUuUDOLVa4txuh2ifge7lQjXABZYjT1aIrB2LePr/yKt4Y
 caKraYGko6rbQF38Bfz10bXYH1bu7PuJKimY7TCMrg==
X-ME-Sender: <xms:f_QDaDJaG1RetfNEheZMZfT6AivNrOYM7nB4l0TCW8U9QEDvDCnyWw>
 <xme:f_QDaHJvvCydHQHVLMs8Ct4FbkzO4BPWm9ISLUxKtOLBtuxvPctmZFDkG6mgR8UIp
 z6fKKcI_XYEPioB2g>
X-ME-Received: <xmr:f_QDaLs31OiZALfSXFMx0noUo51s83qjsvjVP6mLGGiI3VUWSYIHiwe_OKN7Reecz-qgmpCPNQ38ZsiOhfSpGZXu5kPBtTl1H4Sk>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeehkeefucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefufgffkfggtgfgsehtqhertddtreej
 necuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvheqne
 cuggftrfgrthhtvghrnheptdetkeffffefiefhueekvdeiueegieegffdthfelveelgfdt
 vdfhtdduheffuedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopeefpdhm
 ohguvgepshhmthhpohhuthdprhgtphhtthhopehluhguohesghhnuhdrohhrghdprhgtph
 htthhopeejjedvieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtoheprhhu
 thhhvghrthhhvghrseguihhtihhgrghlrdighiii
X-ME-Proxy: <xmx:f_QDaMYotZuMjFnnt2y2YSQL_2NLbOdMZlcFD7KVyvc-UGWRLo7N_w>
 <xmx:f_QDaKYEkJXzhT3PW227rrjXVJSN5bbKdz0JqFRPpPvHSNainFoPcQ>
 <xmx:f_QDaAC7bdCI2QMXeY2031adYuD717zJAEzUyY7zkyMMhzsYhRam_Q>
 <xmx:f_QDaIYwWCtuG3zYHk5dWpvVUPa6loYTDFLSaaMpJdTdpMzBKLUGfA>
 <xmx:f_QDaMywBOHvgoZMhJ0RQDmzEaIjwnCGL9SOI-mwnpOqZSD8O6t-Q159>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 19 Apr 2025 15:07:43 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Rutherther <rutherther@HIDDEN>
Subject: Re: [bug#77266] [PATCH v2] gnu: Merge xorg configurations when
 extending.
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Sat, 19 Apr 2025 12:07:42 -0700
Message-ID: <8734e4ug01.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Rutherther, Rutherther <rutherther@HIDDEN> writes:
 > Hi, > > Ian Eure <ian@HIDDEN> writes: > >> Any other feedback on
 this? Does the manual wording look good? > > I am wondering about the "and
 must provide a complete > configuration." > part in [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [103.168.172.147 listed in list.dnswl.org]
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [103.168.172.147 listed in sa-accredit.habeas.com]
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [103.168.172.147 listed in wl.mailspike.net]
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [103.168.172.147 listed in bl.score.senderscore.com]
X-Debbugs-Envelope-To: 77266
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

Hi Rutherther,

Rutherther <rutherther@HIDDEN> writes:

> Hi,
>
> Ian Eure <ian@HIDDEN> writes:
>
>> Any other feedback on this?  Does the manual wording look good?
>
> I am wondering about the "and must provide a complete=20
> configuration."
> part in documentation. Is that really so after this patch? You=20
> can still
> extend with other services, no? So it doesn't seem right to me=20
> it would
> be necessary to use only set-xorg-configuration, it can be=20
> combined with
> custom service that will append parts of the config.
> At least if I am not missing anything here.
>
> Additionally, I am wondering why do we have that limitation of=20
> just one
> usage of set-xorg-configuration. I suppose the name=20
> 'set-xorg-configuration'
> implies you set it, not append it, etc., but that's not really=20
> true
> after changes from this patch. The limitation comes from the=20
> name of the service
> that is created.

You can mix `set-xorg-configuration' and service extensions, but=20
cannot call `set-xorg-configuration' more than once.  As your=20
note, it has a fixed service name, and having more than one=20
service with the same name causes an error.

> So why not allow a new key/optional argument to set name of
> the service, so that it can be used multiple times, and default=20
> it to
> 'set-xorg-configuration? On the other hand this is probably not=20
> so
> important, I personally don't really see any gain in this
> set-xorg-configuration when user's can just extend the=20
> appropriate
> service instead, so it doesn't seem to me that big of a deal to=20
> change it.

I agree with the latter half of your message: allowing a service=20
name argument makes `set-xorg-configuration' basically the same as=20
writing a `simple-service' definition.  I don=E2=80=99t think it=E2=80=99s =
worth=20
doing.

I=E2=80=99ll clarify the docs and send a v3.

A thing I dislike about all this stuff is how the display managers=20
carry the xorg configuration, vs. having an xorg service which the=20
DMs depend on.  I suppose it=E2=80=99s the way it is because the DMs spawn=
=20
the X server process, but it feels like it should be possible to=20
disentangle things at least a bit more than they are now.  The=20
current setup also seems to preclude usecases like running gdm=20
locally, while using sddm as an XDMCP greeter for other systems.

Thanks,

  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 17 Apr 2025 07:10:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 17 03:10:36 2025
Received: from localhost ([127.0.0.1]:45591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u5JOO-0004nq-AF
	for submit <at> debbugs.gnu.org; Thu, 17 Apr 2025 03:10:36 -0400
Received: from ditigal.xyz ([78.46.201.50]:41354 helo=mail.ditigal.xyz)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>)
 id 1u5JOK-0004nO-LY
 for 77266 <at> debbugs.gnu.org; Thu, 17 Apr 2025 03:10:33 -0400
Received: by cerebrum (OpenSMTPD) with ESMTPSA id 29bf91cd
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Thu, 17 Apr 2025 07:10:24 +0000 (UTC)
From: Rutherther <rutherther@HIDDEN>
To: Ian Eure <ian@HIDDEN>, 77266 <at> debbugs.gnu.org, Ludovic
 =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH v2] gnu: Merge xorg configurations when
 extending.
In-Reply-To: <87mscixu4e.fsf@HIDDEN>
References: <20250326042354.14033-1-ian@HIDDEN>
 <20250326235933.27663-1-ian@HIDDEN> <87mscixu4e.fsf@HIDDEN>
Date: Thu, 17 Apr 2025 09:10:21 +0200
Message-ID: <87cydb6z6q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz;
 i=@ditigal.xyz; q=dns/txt; s=20240917; t=1744873824; h=from : to :
 subject : in-reply-to : references : date : message-id : mime-version
 : content-type : from;
 bh=dZvz+HJ8W99dLgMHCOd87bqObA3gUxgnTAS7PsuSdvg=;
 b=fU8vc/hqrcXtzJQrattDIPJ9UFBKQCM0qnHcqF662Wp67JUVtMKHTPbOosZiPtZwgucd0
 zh2/V6RukjDeesAsCM1v47/ys/4f/xaLisM/6fvenLazoeT788k7O8iiwP973vmW8jIMQYl
 xeUdH+lfTBT1D2B5d76sucAyew0VsFc=
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, Ian Eure <ian@HIDDEN> writes: > Any other feedback
 on this? Does the manual wording look good? 
 Content analysis details:   (2.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [78.46.201.50 listed in bl.score.senderscore.com]
 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [78.46.201.50 listed in sa-trusted.bondedsender.org]
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 77266
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi, Ian Eure <ian@HIDDEN> writes: > Any other feedback
    on this? Does the manual wording look good? 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [78.46.201.50 listed in bl.score.senderscore.com]
  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                           [78.46.201.50 listed in sa-trusted.bondedsender.org]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager


Hi,

Ian Eure <ian@HIDDEN> writes:

> Any other feedback on this?  Does the manual wording look good?

I am wondering about the "and must provide a complete configuration."
part in documentation. Is that really so after this patch? You can still
extend with other services, no? So it doesn't seem right to me it would
be necessary to use only set-xorg-configuration, it can be combined with
custom service that will append parts of the config.
At least if I am not missing anything here.

Additionally, I am wondering why do we have that limitation of just one
usage of set-xorg-configuration. I suppose the name 'set-xorg-configuration'
implies you set it, not append it, etc., but that's not really true
after changes from this patch. The limitation comes from the name of the service
that is created. So why not allow a new key/optional argument to set name of
the service, so that it can be used multiple times, and default it to
'set-xorg-configuration? On the other hand this is probably not so
important, I personally don't really see any gain in this
set-xorg-configuration when user's can just extend the appropriate
service instead, so it doesn't seem to me that big of a deal to change it.

Best regards,
Rutherther




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 16 Apr 2025 14:19:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 16 10:19:05 2025
Received: from localhost ([127.0.0.1]:39621 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u53bT-0000XO-Va
	for submit <at> debbugs.gnu.org; Wed, 16 Apr 2025 10:19:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35758)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1u53bP-0000Vc-NP
 for 77266 <at> debbugs.gnu.org; Wed, 16 Apr 2025 10:19:00 -0400
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 <ludo@HIDDEN>)
 id 1u53bJ-0003dG-MY; Wed, 16 Apr 2025 10:18:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ian Eure <ian@HIDDEN>
Subject: Re: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <87a58g29s5.fsf@HIDDEN> (Ian Eure's message of "Tue, 15 Apr
 2025 18:08:10 -0700")
References: <20250326042354.14033-1-ian@HIDDEN>
 <20250326235933.27663-1-ian@HIDDEN>
 <87a58hhds8.fsf_-_@HIDDEN> <87a58g29s5.fsf@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
X-URL: https://people.bordeaux.inria.fr/lcourtes/
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
X-Revolutionary-Date: Septidi 27 Germinal an 233 de la =?utf-8?Q?R=C3=A9vo?=
 =?utf-8?Q?lution=2C?= jour de =?utf-8?Q?l'An=C3=A9mone?=
Date: Wed, 16 Apr 2025 16:07:38 +0200
Message-ID: <87cydcb3o5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Ian Eure <ian@HIDDEN> writes:

>>   (append (list (service gdm-service-type)
>>                 %xorg-intel-service
>>                 =E2=80=A6)
>>           @dots{})
>
> Can make these changes, but I=E2=80=99m curious why (append (list ...) ..=
.) is
> preferred over cons*.  I default to the latter, because I like the
> removal of the extra level of indent.

In most of the examples in the documentation, we went for =E2=80=98append=
=E2=80=99
because it less obscure to a newcomer than =E2=80=98cons*=E2=80=99 (or =E2=
=80=98cons=E2=80=99, even).

That=E2=80=99s also what the installer generates, and =E2=80=98guix home im=
port=E2=80=99 I
believe.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 16 Apr 2025 01:08:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 21:08:23 2025
Received: from localhost ([127.0.0.1]:58785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4rGI-00051b-VO
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 21:08:23 -0400
Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:49827)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u4rGF-000507-7W
 for 77266 <at> debbugs.gnu.org; Tue, 15 Apr 2025 21:08:21 -0400
Received: from phl-compute-09.internal (phl-compute-09.phl.internal
 [10.202.2.49])
 by mailfout.phl.internal (Postfix) with ESMTP id B673013801CB;
 Tue, 15 Apr 2025 21:08:13 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-09.internal (MEProxy); Tue, 15 Apr 2025 21:08:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1744765693;
 x=1744852093; bh=Xox7eVgPRJozx8zjDdiqDPPrz7zqAhLS/Mt54LZUWQw=; b=
 iSc3Y2CIy0mSu6lRRYemmYBTwwxjkVeI7Te36thLxMI980bQRMyjmpTrZkuhfR8o
 5seWHYQfH5JL23TcTuxDl1ILunUq/CPRsnu5FqZ/sGS1IdOkWG2Gz/eHAyXjEBPe
 NTzZt9heak7Ta2EHSKUXDewpFulHKtnTqTN2S1kXnZkFu9bcmkLNDlY/x/49UgWs
 LtaHfNE1Wn0E2F7AuNyJ11iKWW/YmhMsD512aYsXRbnM1zDHMTEKrlYTAXiheX/I
 LXemK5pQsAI1SHZOldk7WISTa1TuXtW9pugq5Sj5DGNVCYknNBQCdzf00szios/C
 3i2UEK8jpfe0CSzqAwdgUA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744765693; x=
 1744852093; bh=Xox7eVgPRJozx8zjDdiqDPPrz7zqAhLS/Mt54LZUWQw=; b=l
 fmVxhyz8YDIQCTEiI0+HjYXr334id6IB02Vfq8uPn6fnZcRoEpIBNw1xE88uNQlY
 EpdpICi27Wukmq0gfIIqQC7A+99h/tP5G1OfJSCWBUXx0R3BGfTrHKzwp0vP+DQe
 cuNOELRrl5lT+WN/ljElPAeXJL4QflYFjPF3vH24t6J3G2/Q7FfC8bEaCcf4xW5R
 7TFa3GOX8pUT7BfNnhzwTI27YZ8l1OUx50dGW3f/mIDZtNXQwBGs8iwFugdVpnHV
 WQU6m+eHRqBy8faZdZdDkK7qYKqASdTfblEnEwGCUAd2ynL7KWuyltUdYI/DNjv3
 maZuZKgepatVM6C7LrMmQ==
X-ME-Sender: <xms:_AL_Zw3oVW5Xxahfh7Xq8knIDWVzr8o0Ba9s2-9oVZ8e3d_Wlx5nKg>
 <xme:_AL_Z7GXAaPmkyz7xK5HF2fuymkRdePTUPthwl9RWOXk112oTVMaXUCs0wu228egk
 PCoa-N7rCl2DZF3gw>
X-ME-Received: <xmr:_AL_Z470giJwYebuUGwzOZqwcUXr5yDtFwUFHfTflux7DdRPRaXQodz4ionZgkVoPIpmhgcnRizYsiN_Z6ddfza3e1zjkeooGZwk>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvdehtdduucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgfgsehtqhertddt
 reejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvh
 eqnecuggftrfgrthhtvghrnhepveeuleeugedujeeukefhhffhlefgjeehfeffhefgffel
 keevkeeutdegkeelgeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg
 hilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopedv
 pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejjedvieeiseguvggssghughhsrd
 hgnhhurdhorhhgpdhrtghpthhtoheplhhuughosegthhgsohhuihgsrdhorhhg
X-ME-Proxy: <xmx:_QL_Z50gRTWWT60te0KSoy9PRx0s7_Wxrmb4ZXBNUjF03ffl8OCaew>
 <xmx:_QL_ZzG1uzwVSCbOKw2Vl7k1cJSlT2fCIOf14qKiKSbJMi_U8q39eQ>
 <xmx:_QL_Zy_IyIj1xusdJepIbGh2dm50XzmrZ7CBgInb8AQPNmkkPiEPUA>
 <xmx:_QL_Z4kHSWFCFn0IZRpcFBSBkHeypfK6E5SmVn1XObplCOr3wXeCiQ>
 <xmx:_QL_Z7U1dVpehr73m2JhWtgxY1fhBR_qJGsc9aQKKlF9VqFwf57mJRvz>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 15 Apr 2025 21:08:12 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <87a58hhds8.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court?=
 =?utf-8?Q?=C3=A8s=22's?= message of
 "Tue, 15 Apr 2025 13:20:23 +0200")
References: <20250326042354.14033-1-ian@HIDDEN>
 <20250326235933.27663-1-ian@HIDDEN> <87a58hhds8.fsf_-_@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Tue, 15 Apr 2025 18:08:10 -0700
Message-ID: <87a58g29s5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hello Ian,
>
> Ian Eure <ian@HIDDEN> writes:
>
>> +(define %xorg-keyboard-service
>> +  (simple-service
>> +   'xorg-keyboard
>> +   gdm-service-type
>> +   (xorg-configuration (keyboard-layout keyboard-layouut))))
>
> Could you fix the indentation and add short comments above the
> definitions?

Definitely.

>> +(operating-system
>> +  (services
>> +   (cons*
>> +    (service gdm-service-type)
>> +    %xorg-intel-service
>
> Rather:
>
>   (append (list (service gdm-service-type)
>                 %xorg-intel-service
>                 =E2=80=A6)
>           @dots{})

Can make these changes, but I=E2=80=99m curious why (append (list ...)=20
...) is preferred over cons*.  I default to the latter, because I=20
like the removal of the extra level of indent.

> Something I had overlooked: this assumes that elements of this=20
> list can
> be compared with =E2=80=98equal?=E2=80=99.  Typically, these are <file-ap=
pend>=20
> records
> that refer to <package> records, and those cannot be usefully=20
> compared
> with =E2=80=98equal?=E2=80=99 (it=E2=80=99s effectively equivalent to =E2=
=80=98eq?=E2=80=99 in the case=20
> of
> <package> records, but more expensive).
>
> So, what about removing =E2=80=98delete-duplicates=E2=80=99 from here, an=
d=20
> instead=E2=80=A6
>
>>  (define (xorg-configuration->file config)
>>    "Compute an Xorg configuration file corresponding to CONFIG,=20
>>    an
>
> =E2=80=A6 adding =E2=80=98delete-duplicates=E2=80=99 calls in here, on th=
e build side.

Good catch, makes sense to me.  Will send a v3.

Thanks,
  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 15 Apr 2025 11:35:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 07:35:06 2025
Received: from localhost ([127.0.0.1]:50971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4eZG-0005ji-9y
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 07:35:06 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:33980)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1u4eZC-0005it-I0
 for 77266 <at> debbugs.gnu.org; Tue, 15 Apr 2025 07:35:04 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 29B5320B;
 Tue, 15 Apr 2025 13:34:55 +0200 (CEST)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id OlUpeB0kKuYc; Tue, 15 Apr 2025 13:34:54 +0200 (CEST)
Received: from ribbon (nat-eduroam-36-gw-01-bso.bordeaux.inria.fr
 [194.199.1.36])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 3784F1A1;
 Tue, 15 Apr 2025 13:34:53 +0200 (CEST)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ian Eure <ian@HIDDEN>
Subject: Re: bug#77266: [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <20250326235933.27663-1-ian@HIDDEN> (Ian Eure's message of
 "Wed, 26 Mar 2025 16:59:32 -0700")
References: <20250326042354.14033-1-ian@HIDDEN>
 <20250326235933.27663-1-ian@HIDDEN>
Date: Tue, 15 Apr 2025 13:20:23 +0200
Message-ID: <87a58hhds8.fsf_-_@HIDDEN>
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-Rspamd-Queue-Id: 29B5320B
X-Spamd-Result: default: False [-6.10 / 15.00]; BAYES_HAM(-3.00)[100.00%];
 NEURAL_HAM(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWO(0.00)[2];
 ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[];
 FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ------
X-Rspamd-Server: hera
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Hello Ian,

Ian Eure <ian@HIDDEN> writes:

> Configuration for xorg is embedded in the various display-manager
> configuration records, and extension support is factored out into the
> `handle-xorg-configuration' macro.  However, the extension mechanism repl=
aces
> the existing xorg-configuration with the supplied one, making it impossib=
le to
> compose configuration from multiple sources.  This patch adds a procedure=
 to
> merge two xorg-configuration records, and calls it within
> handle-xorg-configuration, allowing the config to be built piecemeal.
>
> * gnu/services/xorg.scm (merge-xorg-configurations): New variable.
> (handle-xorg-configuration): Merge xorg configs.
> * doc/guix.texi (X Window): Document xorg-configuration composition.
>
> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
> +@lisp
> +(define %xorg-intel-service
> +  (simple-service
> +  'xorg-intel
> +  gdm-service-type
> +  (xorg-configuration
> +   (modules (list xf86-video-intel))
> +   (drivers '("intel")))))
> +
> +(define %xorg-keyboard-service
> +  (simple-service
> +   'xorg-keyboard
> +   gdm-service-type
> +   (xorg-configuration (keyboard-layout keyboard-layouut))))

Could you fix the indentation and add short comments above the
definitions?

> +(operating-system
> +  (services
> +   (cons*
> +    (service gdm-service-type)
> +    %xorg-intel-service

Rather:

  (append (list (service gdm-service-type)
                %xorg-intel-service
                =E2=80=A6)
          @dots{})

> +(define (merge-xorg-configurations a b)
> +  (let ((configs (list b a)))           ; Prefer later configurations.
> +    (xorg-configuration
> +     (modules
> +      (delete-duplicates (append-map xorg-configuration-modules configs)=
))
> +     (fonts
> +      (delete-duplicates (append-map xorg-configuration-fonts configs)))
> +     (drivers
> +      (delete-duplicates (append-map xorg-configuration-drivers configs)=
))
> +     (resolutions
> +      (delete-duplicates (append-map xorg-configuration-resolutions conf=
igs)))

Something I had overlooked: this assumes that elements of this list can
be compared with =E2=80=98equal?=E2=80=99.  Typically, these are <file-appe=
nd> records
that refer to <package> records, and those cannot be usefully compared
with =E2=80=98equal?=E2=80=99 (it=E2=80=99s effectively equivalent to =E2=
=80=98eq?=E2=80=99 in the case of
<package> records, but more expensive).

So, what about removing =E2=80=98delete-duplicates=E2=80=99 from here, and =
instead=E2=80=A6

>  (define (xorg-configuration->file config)
>    "Compute an Xorg configuration file corresponding to CONFIG, an

=E2=80=A6 adding =E2=80=98delete-duplicates=E2=80=99 calls in here, on the =
build side.

WDYT?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 14 Apr 2025 22:21:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 14 18:21:01 2025
Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4SAm-0005Sz-LV
	for submit <at> debbugs.gnu.org; Mon, 14 Apr 2025 18:21:00 -0400
Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]:52985)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u4SAi-0005Se-IN
 for 77266 <at> debbugs.gnu.org; Mon, 14 Apr 2025 18:20:56 -0400
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 0FBF325402D7;
 Mon, 14 Apr 2025 18:20:51 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Mon, 14 Apr 2025 18:20:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:content-type:content-type:date:date:from:from:in-reply-to
 :in-reply-to:message-id:mime-version:references:reply-to:subject
 :subject:to:to; s=fm1; t=1744669250; x=1744755650; bh=mw/BLrL3Om
 AusT9QBx7VYXc4mXLkJp8tnq7R9+BVx2Y=; b=Efz0883gOko3ccsmloVY8NrBf1
 tC9kgKYxvSD7QMPTVY8KE1mJSKGl7PXWcbG9el0CsRuzFTAjhSkMr5Y/EDruOTde
 f/2bxUKE+0fMQRzqTA+KfCl1yCjFLLIH1GCa5JeKluG7JjMAibm9cV8ICeEzumuU
 J4TGLDjoK2re0TBqtRij7pfRDvyabFHoi+GSdTgJr3ylEPxfBO8HLSW+UumIyq49
 CjkZ5tBNgKYW/4q9+Y6z2oYXDCM1hpewJmSF0S9ejRPtBBw+hXsbOjpeiBJ/rtC4
 WSG90yB0dOz7lx77msix9lnwIjtREntFWkLqqgZpPIO6n7fslCLlSJl+syjg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1744669250; x=1744755650; bh=mw/BLrL3OmAusT9QBx7VYXc4mXLkJp8tnq7
 R9+BVx2Y=; b=IHLyXum+upL2/1zRX2wW3CcJ/bxXFyyvAlZHP5WZI7J19FOEjKe
 N8Xj8NnzfXlNF5bkamnNxTNFQEIMoXeWm4QruV70sPvFwhIQ+ApbWh0kiO/UZn0j
 aRr0IG2i/uci7r0BbSiRGHsS5HJj+AfNez5GZu+0Z5cw+1zbq3JU+FWrNB+Az88r
 OkwjW1EoPvacJ30EISZ4fiCI1JJzXHwSYDZCqGCgdcfxIip51IsY+XFqvL4jemT4
 r8dBGDWh21Z27wdES4BgAPHVAK7iDgGCm0u//XKBwEvOH7dY8x0+WfvUF7AuhFlX
 dQ3EJ0N4KNSe+4WhuuSorQX84KmGuLPrFrw==
X-ME-Sender: <xms:Qor9Z7gvbfyrA6jkRVbXOvvXDMxqUXw-LWlib5AFNz1UuLaTlxlIlA>
 <xme:Qor9Z4C98mjzviRCf7_apDtUQnLCCt011Hn3FV32hlGvEX_r3sgtncEOyaWGyK4Sp
 XYV9ZUEaN_jy33yQA>
X-ME-Received: <xmr:Qor9Z7EH_G5AO8zeRMlskhwC5z0qz29gi7N7rYBTeCr0lxZy7fxLtJdNWHUf3I7UYNygaj6KfBlpyvJDwBOmmVhtO5B1Ed8sAmvl>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvddujeefucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvufgjfhgffffkgggtsehttdertddtredt
 necuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvheqne
 cuggftrfgrthhtvghrnhepgfeugfdtheevheeuhfelieduteejudffveejgffgtdfhkeek
 hfeludfhteefiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopeefpdhm
 ohguvgepshhmthhpohhuthdprhgtphhtthhopehluhguohesghhnuhdrohhrghdprhgtph
 htthhopehruhhthhgvrhhthhgvrhesughithhighgrlhdrgiihiidprhgtphhtthhopeej
 jedvieeiseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:Qor9Z4S4R4pCbZ0dG4w_tRPYncfDOHjznWTEd0veMbeyRtXJc3SAXA>
 <xmx:Qor9Z4zsQx5FJZq2TZHDwONYcwBjPKFR0YfJ5A-gqRROAvIKC01kIA>
 <xmx:Qor9Z-4baOOwk1dwisyRODQ0ctm-yOelDspdMpftWhfvlfJCSi28sQ>
 <xmx:Qor9Z9xJcfJKANrvApFkFZRRQ5Nujne4q7JkU209xzvFC1UJsxkg2w>
 <xmx:Qor9Z6onxNEqsnjSNzU5EJYpbcG8yG7iSOhCez7CDuV_Um9wxHg9Q35R>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 14 Apr 2025 18:20:49 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org, Rutherther <rutherther@HIDDEN>, Ludovic
 =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH v2] gnu: Merge xorg configurations when
 extending.
In-Reply-To: <20250326235933.27663-1-ian@HIDDEN> (Ian Eure's message of
 "Wed, 26 Mar 2025 16:59:32 -0700")
References: <20250326042354.14033-1-ian@HIDDEN>
 <20250326235933.27663-1-ian@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Mon, 14 Apr 2025 15:20:49 -0700
Message-ID: <87mscixu4e.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Any other feedback on this?  Does the manual wording look good?

  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 23:59:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 19:59:56 2025
Received: from localhost ([127.0.0.1]:44943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txaf5-0004UI-Ah
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 19:59:56 -0400
Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:60663)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txaf0-0004SL-4M
 for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 19:59:53 -0400
Received: from phl-compute-05.internal (phl-compute-05.phl.internal
 [10.202.2.45])
 by mailfout.phl.internal (Postfix) with ESMTP id 7DF1E13838F0;
 Wed, 26 Mar 2025 19:59:44 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-05.internal (MEProxy); Wed, 26 Mar 2025 19:59:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:message-id:mime-version:reply-to
 :subject:subject:to:to; s=fm1; t=1743033584; x=1743119984; bh=0I
 PbQwHlpM1miJ6dfEePoY2bkga4RmIx2z3l5vx4LA8=; b=dvksyx6pWNa+Xz5oOb
 nhMwpk6laDRLiih89dZSsMoIqjAziPo0X64Gz9netKKH5sbFBOcHzS/hAeA41pk+
 0NbNpxkru92J/VRiVEnebVccSScyISuvaZhmrUSQwxneMIlMvT0EHNpme4L+rJU3
 LDTqDihernMGhqdNY9aOvpdfcqw034EMb8NKU3m0ZTZRV7zgRKvRcVcaebPvQb8k
 ziUCd8u0AvLVIq1IOzKKYAGiLbz75Eu4CEGdDGYoI0AR/f1t2cwCoj/KMnKUNlxz
 tlz39ISfEB4ER4kFMD2koozfvL7E72dPEr17zsYnxjiNeu99WH4ZBOjKhaGrCLfm
 oExA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:message-id:mime-version:reply-to:subject
 :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; t=1743033584; x=1743119984; bh=0IPbQwHlpM1miJ6dfEePoY2bkga4
 RmIx2z3l5vx4LA8=; b=ehZmWx18jT3qRXyxAjw3HIvG/OHZkxwMHS2+FV4VmMl5
 bH8G44n4cMZ6ubRTFrXIcechZpG6FUDDqmBGuC574rgzde1WnCw8dUCiuzQCAMSS
 YfiPcR+F7F3JiMiXy4iuDD3kWfvRT0JyGACtdk75IhVjjU0I3EpKCMN13DAAQCFT
 SoTyaFZ/25IexR3qBrX8TJ7Umggeq1SLiy0RSegUg0E4wPNp+AIcHkMyYGnqj4ra
 TEJBoTPisp4mDvRdaJ5ff74qDHxvW1ZGnV/5C7Be+xsfXA0bnJAhMPxHxxM9nk1/
 M9C0ry8ei0WV35X44TFq+62QV/YQ9YjIyCaKSqOEww==
X-ME-Sender: <xms:75TkZ72jSwPUx6EFddbBMFsLqM7EaZi4rVFoBBB046TgAqpnjbrgPA>
 <xme:75TkZ6Ghgnzgt6CgDbNWKDyJdqjfaD0XArUDddT85HHkMf5kt_ienlhR8RkfD5ta-
 a3E0WZZ-wpjywTdXw>
X-ME-Received: <xmr:75TkZ77PofZMMwlnWSEizTHhgAVrFsxLCszzBQk1_AP-L3iN7DGCdo-KIcanvhnjzQATQtOm7NsLOTG3D__r3f8tq2hSg2EwK2C62J7lIR9LFdOfMu7Q3Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeileduucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffogggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgr
 nhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefgueekffejudfgvd
 evteelteeitdeuuddufffhuefhiefhjeetuefhgfettedvteenucevlhhushhtvghrufhi
 iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrd
 htvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep
 jeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnsehrvg
 htrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:75TkZw2Ule9jnGSIOeNrslZUQo_PREWYHFF38yk64iA1W4HRjFr5aw>
 <xmx:75TkZ-F782MsrTilBQxkxLR3e582AIXckyjmOcFwbdpGf7yOEE-JzQ>
 <xmx:75TkZx-BSiJQK8Q5Y8_I_gwxOoefr5ioDZrr-oyDoPOIM7jU4Ogc_Q>
 <xmx:75TkZ7ll7OYPhpEKQBQ9IkHNFQj8YwSwWO66fw6mqK6G5vpUgUZH0w>
 <xmx:8JTkZzTEo38nkDmwN6hj0kNMQpfqiv9LD8ZQf21diX3daWhPyAzn1EfY>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 26 Mar 2025 19:59:43 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Merge xorg configurations when extending.
Date: Wed, 26 Mar 2025 16:59:32 -0700
Message-ID: <20250326235933.27663-1-ian@HIDDEN>
X-Mailer: git-send-email 2.48.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Configuration for xorg is embedded in the various display-manager
configuration records, and extension support is factored out into the
`handle-xorg-configuration' macro.  However, the extension mechanism replaces
the existing xorg-configuration with the supplied one, making it impossible to
compose configuration from multiple sources.  This patch adds a procedure to
merge two xorg-configuration records, and calls it within
handle-xorg-configuration, allowing the config to be built piecemeal.

* gnu/services/xorg.scm (merge-xorg-configurations): New variable.
(handle-xorg-configuration): Merge xorg configs.
* doc/guix.texi (X Window): Document xorg-configuration composition.

Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
---
 doc/guix.texi         | 34 ++++++++++++++++++++++++++++++++--
 gnu/services/xorg.scm | 33 +++++++++++++++++++++++++++++----
 2 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 730fb45798..1dedf81715 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -138,6 +138,7 @@ Copyright @copyright{} 2024 45mg@*
 Copyright @copyright{} 2025 Sören Tempel@*
 Copyright @copyright{} 2025 Rostislav Svoboda@*
 Copyright @copyright{} 2025 Zacchaeus@*
+Copyright @copyright{} 2025 Ian Eure@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -24865,8 +24866,37 @@ Tell the log-in manager (of type @var{login-manager-service-type}) to use
 @var{config}, an @code{<xorg-configuration>} record.
 
 Since the Xorg configuration is embedded in the log-in manager's
-configuration---e.g., @code{gdm-configuration}---this procedure provides a
-shorthand to set the Xorg configuration.
+configuration---e.g., @code{gdm-configuration}---this procedure provides
+a shorthand to set the Xorg configuration.
+
+Note that @code{set-xorg-configuration} can only be used once, and must
+provide a complete configuration.  If you know the service-type of the
+log-in manager, you can compose a configuration from smaller pieces:
+
+@lisp
+(define %xorg-intel-service
+  (simple-service
+  'xorg-intel
+  gdm-service-type
+  (xorg-configuration
+   (modules (list xf86-video-intel))
+   (drivers '("intel")))))
+
+(define %xorg-keyboard-service
+  (simple-service
+   'xorg-keyboard
+   gdm-service-type
+   (xorg-configuration (keyboard-layout keyboard-layouut))))
+
+(operating-system
+  (services
+   (cons*
+    (service gdm-service-type)
+    %xorg-intel-service
+    %xorg-keyboard-service
+    %base-services))
+  ...)
+@end lisp
 @end deffn
 
 @deffn {Procedure} xorg-start-command [config]
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index bef05b9bb9..c2e34bc10c 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration>
   (server-arguments xorg-configuration-server-arguments ;list of strings
                     (default %default-xorg-server-arguments)))
 
+(define (merge-xorg-configurations a b)
+  (let ((configs (list b a)))           ; Prefer later configurations.
+    (xorg-configuration
+     (modules
+      (delete-duplicates (append-map xorg-configuration-modules configs)))
+     (fonts
+      (delete-duplicates (append-map xorg-configuration-fonts configs)))
+     (drivers
+      (delete-duplicates (append-map xorg-configuration-drivers configs)))
+     (resolutions
+      (delete-duplicates (append-map xorg-configuration-resolutions configs)))
+     (extra-config (append-map xorg-configuration-extra-config configs))
+     ;; Prefer the more recently set layout.
+     (keyboard-layout (or (xorg-configuration-keyboard-layout b)
+                          (xorg-configuration-keyboard-layout a)
+                          #f))
+     (server
+      ;; Prefer the non-default server.
+      (if (eq? xorg-server (xorg-configuration-server a))
+          (xorg-configuration-server b)
+          (xorg-configuration-server a)))
+     (server-arguments
+      ;; Prefer the non-default arguments.
+      (if (eq? %default-xorg-server-arguments
+             (xorg-configuration-server-arguments a))
+          (xorg-configuration-server-arguments b)
+          (xorg-configuration-server-arguments a))))))
+
 (define (xorg-configuration->file config)
   "Compute an Xorg configuration file corresponding to CONFIG, an
 <xorg-configuration> record."
@@ -628,10 +656,7 @@ (define-syntax handle-xorg-configuration
     ((_ configuration-record service-type-definition)
      (service-type
        (inherit service-type-definition)
-       (compose (lambda (extensions)
-                  (match extensions
-                    (() #f)
-                    ((config . _) config))))
+       (compose (cut reduce merge-xorg-configurations #f <>))
        (extend (lambda (config xorg-configuration)
                  (if xorg-configuration
                      (configuration-record
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 19:15:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 15:15:56 2025
Received: from localhost ([127.0.0.1]:44424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txWEF-0008K9-Tk
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:56 -0400
Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:53667)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txWED-0008Jm-Sh
 for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:54 -0400
Received: from phl-compute-07.internal (phl-compute-07.phl.internal
 [10.202.2.47])
 by mailfhigh.phl.internal (Postfix) with ESMTP id B3E481140218;
 Wed, 26 Mar 2025 15:15:48 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-07.internal (MEProxy); Wed, 26 Mar 2025 15:15:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1743016548;
 x=1743102948; bh=0lZi0QYN6cMPYgeiIim5Rkl/c7Ni6OGRTXRwcmzJTtU=; b=
 j3xC4IIGnQQCwHsDD6j5XmUPqRtHBbHtVma5CsdA6trO3IPXDyHQafRTZgCNdv5B
 pTII4v0gszFv0gqyAI8aZCSMHXOV/MoIAmlMcVjADFIP4uMfcg3zm1eJ9OVDNB6A
 uKwB1RPdHSpufKl0buN6oMwey1URn06dXG1P39GlMpoN9IlRFwAuUFt+doSvxYXH
 f4MHtcu9yUIa8sZHpniq9z2PTx8aXcLX3hnutWUGBKS9pOaGd5zX+J01kRENgjXs
 /SfqsOi8r6BaBM56T/Zd/bJg4H4cZQlJvRevGHcl2/nag0255a2IaaKGX9ZIlsEJ
 5V3A7gZ6dc6o6JZMEJqbUQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743016548; x=
 1743102948; bh=0lZi0QYN6cMPYgeiIim5Rkl/c7Ni6OGRTXRwcmzJTtU=; b=P
 yLkyPKiNQ5qmrq6UlmsWl6do8NfUZCKljWasJvgsIGqGF8ujP/Iclcup3dBeKR2O
 HPzVe2Vfdqnj/7BcvXqk1Ln8mMCTgVZUSA66qYY4kjEpKP3xF1depyAkTGVf2IQi
 ganC+TtHBV3jklD6awV1B91PBwV6f1yYm3FHiTtoEiQv0iQeefC/jE5tR4iHUes3
 DQWze4A4WyTm7tg04j5g7343oYPjBSyF6BnaXcFsX4V+M3PlAV2TYw7L9ndNzk8w
 w3sH0WE8KWCm+gkvd8wVHcDR4Hlp4V5+klPCZSWOPUCgBymO9P0Richo0oFF+n42
 KnYRKZzZeugtN9QZwOzGg==
X-ME-Sender: <xms:ZFLkZ8U1ivbrjohuAI6-Y1NMlJFTOx22lcE_VOHDEJ7no1Duw1nkRg>
 <xme:ZFLkZwn_udS_31knhX4g6P1fZdOrvc8tFqGZcTdYEkcyOLv1VM67Z3JTpQ2d-W-4f
 AIoeX1mTFUTp6anOA>
X-ME-Received: <xmr:ZFLkZwYFAJBnJKhFoJbODK6TSLGe6bhU7aHbOG0TKphqKfA6dsW4_DkE0a8hkIml0XtTJ7ZfHgQQ7gT3Dv0NJYC7_n4rYpmo3fJAsql9cA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeifeegucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgfgsehtqhertddt
 reejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvh
 eqnecuggftrfgrthhtvghrnhepveeuleeugedujeeukefhhffhlefgjeehfeffhefgffel
 keevkeeutdegkeelgeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg
 hilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopedv
 pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejjedvieeiseguvggssghughhsrd
 hgnhhurdhorhhgpdhrtghpthhtoheplhhuughosehgnhhurdhorhhg
X-ME-Proxy: <xmx:ZFLkZ7Xz8G4fPS1qxz337TgCiVBcSmIMR8aBgu2hfvmpYS5cqKR3OA>
 <xmx:ZFLkZ2kmrJSbScds3m082WxkenhzM7bMLrqiOMYK7y6FocLN-zW1jQ>
 <xmx:ZFLkZwdNge-8pUQYUA_hhAl2R7KxQ8GZXZc-X27xwmVYQ0f4jxds6Q>
 <xmx:ZFLkZ4GnU6zIb5ss-jUXndkLpOpxjihgpYaQ1h66xqAFNeC4QGTg5g>
 <xmx:ZFLkZ7w3BJeH_fkGxLTgwyX55pXXT0IuW1eNic6Dom_zqdniqOmFHx5c>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 26 Mar 2025 15:15:47 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <87r02jk90u.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Wed, 26 Mar 2025 18:16:01 +0100")
References: <20250326042354.14033-1-ian@HIDDEN> <87r02jk90u.fsf@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Wed, 26 Mar 2025 12:15:46 -0700
Message-ID: <87cye3hacd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi!
>
> Ian Eure <ian@HIDDEN> skribis:
>
>> Configuration for xorg is embedded in the various=20
>> display-manager
>> configuration records, and extension support is factored out=20
>> into the
>> `handle-xorg-configuration' macro.  However, the extension=20
>> mechanism replaces
>> the existing xorg-configuration with the supplied one, making=20
>> it impossible to
>> compose configuration from multiple sources.  This patch adds a=20
>> procedure to
>> merge two xorg-configuration records, and calls it within
>> handle-xorg-configuration, allowing the config to be built=20
>> piecemeal.
>>
>> * gnu/services/xorg.scm (merge-xorg-configurations): New=20
>> variable.
>> (handle-xorg-configuration): Merge xorg configs.
>>
>> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
>
> Maybe you can add a word in the relevant part of the manual to=20
> give an
> idea of how configs are merged.

Definitely, do you want a look at the wording, or should I write=20
that up and merge?

Will send a v2 later today.

Thanks,
  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 19:15:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 15:15:14 2025
Received: from localhost ([127.0.0.1]:44416 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txWDa-0008FJ-4V
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:14 -0400
Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:50909)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txWDW-0008Cn-Nn
 for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:11 -0400
Received: from phl-compute-03.internal (phl-compute-03.phl.internal
 [10.202.2.43])
 by mailfout.phl.internal (Postfix) with ESMTP id 52B3A1382D08;
 Wed, 26 Mar 2025 15:15:05 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-03.internal (MEProxy); Wed, 26 Mar 2025 15:15:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1743016505;
 x=1743102905; bh=njYfGLkUqQ0bvWpwh8DsnF0RxuwF4TQZhatMRWtCnoY=; b=
 kgVew6+obvegA5+Jytbituibn9dEUQMNX58E2DGG/eHgLvURhsTR1kITDKFBX2xx
 NhMiVSmAVyuoGnbALd+66Ws/VRMTXy81A5B72c46gJyEfkD5d+TtiOttj1xyW4qY
 AmgwXyG8ocrRjFzMOf7KHnhlLfJfNgGZzje9+yoa/BFpLgNtR3+l6O4x3gwIjGPu
 xDEra3kJQFIvgcdliVnpWkvp00PXw/yY76sp/rbz/T7f65YKEchsK/vN92bincM3
 nEN2OCxD0eQnmfstdrk1/xU1YHKaf6UBpR9krfVpHvDqogNwcNmOliPQCLymsiX7
 y7xkRxDQY8EYSiS3l43uig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743016505; x=
 1743102905; bh=njYfGLkUqQ0bvWpwh8DsnF0RxuwF4TQZhatMRWtCnoY=; b=d
 zPWp+7dU7k59zcmAzxBgboPfX80K1/d4habslHfia3MHMwlMoCB5Qz6Yd6WRdWtQ
 KBRSiDgFnBdSOXNVkJiRlCs6IekNAtE3GQD1fOLHzAq3HAhVoekLWZE5gSYLbZYd
 REfqVrI4kaNzbfvyrwdWMXb7GY5QBupv83AkVxlR2uOprFCwaGNvplj2hb3dVsUo
 GtehREJRs5cgduhCFumbZkGmHrlGRgf896ybicuROhWVNbsqgRiBp6IS34/dSLFL
 OX9drVRLE05ariuW99V5ZW5HHS27z+iakAglJwlfxZE8BrnpBSgVNE5VG3A5MIDO
 4dN0pO/8UpF9xtjPkiD7Q==
X-ME-Sender: <xms:OVLkZ0yvCpNX19WVvbhsshGV6e73pTplsItpI3qJCD83BNyDCUSOnA>
 <xme:OVLkZ4QHEf-hBUQKvP_QoZfm5tXs2DhWZ5pF3roPEcpOOuVzjGaqL0ryEwHLVWFEd
 wrBuJDmz4r9kbStKQ>
X-ME-Received: <xmr:OVLkZ2UjEURqePG5WhohDi8Q_CagwIiKQMiXk5jV12GK2HI-HsSPj1T4CUwnvMsDkakRhlS_gE5Rcy1OXkKrnVbApZClHVT3RFwAbY0gnw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeifeegucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
 gvnhhtshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgfgsehtqhertddt
 reejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvh
 eqnecuggftrfgrthhtvghrnhepveeuleeugedujeeukefhhffhlefgjeehfeffhefgffel
 keevkeeutdegkeelgeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg
 hilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopeef
 pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehluhguohesghhnuhdrohhrghdprh
 gtphhtthhopeejjedvieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohep
 rhhuthhhvghrthhhvghrseguihhtihhgrghlrdighiii
X-ME-Proxy: <xmx:OVLkZyg8GN3OIPHQtgb5TMq6ebxJC7mxk6pxBFG8I9SUbP4j349Dgg>
 <xmx:OVLkZ2BRgUoUYx9CrF0Y9zAJQumPd9Tbpg3WiM9zT37vQxftII-HgA>
 <xmx:OVLkZzKCkq1L-68ne_SCfT1vFdRdiIgKbQhSyJUhLfbLf0WSC23eYQ>
 <xmx:OVLkZ9DsD12-qw85DsE3bRSX_-uhbR164yVP7WVaLj_Wez8iumA0tw>
 <xmx:OVLkZxM8oiO8CF8VIhJaVWEcZya34WKzAQ6mTjA9IOxuHCmGAC3sFVjF>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 26 Mar 2025 15:15:04 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: Rutherther <rutherther@HIDDEN>
Subject: Re: [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <87msd7aebh.fsf@HIDDEN> (rutherther@HIDDEN's message of
 "Wed, 26 Mar 2025 18:31:46 +0100")
References: <87msd7aebh.fsf@HIDDEN>
User-Agent: mu4e 1.12.9; emacs 29.4
Date: Wed, 26 Mar 2025 12:15:03 -0700
Message-ID: <87iknvhadk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi Rutherther, Rutherther <rutherther@HIDDEN> writes:
 > Hello, just wondering,
 wouldn't it make sense to inherit from > the > previous
 a or b in case someone added a field to > xorg-configuration and > forgot
 to change this service? 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [103.168.172.146 listed in bl.score.senderscore.com]
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [103.168.172.146 listed in sa-trusted.bondedsender.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [103.168.172.146 listed in list.dnswl.org]
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: 77266
Cc: Ludovic =?utf-8?B?Q291cnTDg8Kocw==?= <ludo@HIDDEN>, 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

Hi Rutherther,

Rutherther <rutherther@HIDDEN> writes:

> Hello, just wondering, wouldn't it make sense to inherit from=20
> the
> previous a or b in case someone added a field to=20
> xorg-configuration and
> forgot to change this service?

I considered using inherit, but since every field has to be set to=20
the combined values of both records, saw no value in doing so.  In=20
the case you outline, both inheriting and not will produce an=20
incorrect result -- inheriting will discard all but one=20
user-specified=E2=80=99s value, while not inheriting discards all=20
user-specified value and uses the default.  Both are wrong, but I=20
think the latter is more likely to get noticed (therefore fixed).

Thanks,
  -- Ian




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 17:32:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 13:32:00 2025
Received: from localhost ([127.0.0.1]:44240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txUbg-0002j6-0Z
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:32:00 -0400
Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:60212 helo=mail.ditigal.xyz)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>)
 id 1txUbd-0002ie-6i
 for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:31:58 -0400
Received: by cerebrum (OpenSMTPD) with ESMTPSA id a1e4dca0
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Wed, 26 Mar 2025 17:31:49 +0000 (UTC)
From: Rutherther <rutherther@HIDDEN>
To: 77266 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <87r02jk90u.fsf@HIDDEN>
Date: Wed, 26 Mar 2025 18:31:46 +0100
Message-ID: <87msd7aebh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz;
 i=@ditigal.xyz; q=dns/txt; s=20240917; t=1743010309; h=from : to : cc
 : subject : in-reply-to : date : message-id : mime-version :
 content-type : from; bh=TMMwl2//0qTkXBucz+sxN7p9kxUwcHjKJb5ZwN2t3a0=;
 b=ezCoHpXRaXlJUzHKjYknQlHqsb3f5ZkoorUyvSFDE5qR5vCCZuMLVwBacKIKOJaOJwq5X
 LMQJ25txya9dSKZf/A1NetFarvduGXM6vNKEYep53stV/XQ7aN4pUviIGrV/7lRCz/miEim
 X5FbpvJ/Vo2kAEEHudRM7PAnotwREgs=
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hello, just wondering, wouldn't it make sense to inherit from
 the previous a or b in case someone added a field to xorg-configuration and
 forgot to change this service? Or is there some kind of a smart way how we
 can in Guix ensure stuff like that is properly checked? I can see someone
 forgetting about stuff like that... 
 Content analysis details:   (2.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 77266
Cc: Ludovic =?utf-8?B?Q291cnTDg8Kocw==?= <ludo@HIDDEN>,
 Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hello, just wondering, wouldn't it make sense to inherit from
    the previous a or b in case someone added a field to xorg-configuration and
    forgot to change this service? Or is there some kind of a smart way how we
    can in Guix ensure stuff like that is properly checked? I can see someone
    forgetting about stuff like that... 
 
 Content analysis details:   (2.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ditigal.xyz (xyz)]
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager


Hello, just wondering, wouldn't it make sense to inherit from the
previous a or b in case someone added a field to xorg-configuration and
forgot to change this service?

Or is there some kind of a smart way how we can in Guix ensure stuff
like that is properly checked? I can see someone forgetting about stuff
like that...

Rutherther




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at 77266 <at> debbugs.gnu.org:


Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 17:16:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 13:16:16 2025
Received: from localhost ([127.0.0.1]:44205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txUMR-0001sF-SW
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:16:16 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:51632)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1txUMO-0001rx-9C
 for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:16:13 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 0E403DDF;
 Wed, 26 Mar 2025 18:16:05 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id pvB245NZ0xBR; Wed, 26 Mar 2025 18:16:04 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id CB75A3CF;
 Wed, 26 Mar 2025 18:16:01 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ian Eure <ian@HIDDEN>
Subject: Re: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending.
In-Reply-To: <20250326042354.14033-1-ian@HIDDEN> (Ian Eure's message of
 "Tue, 25 Mar 2025 21:23:54 -0700")
References: <20250326042354.14033-1-ian@HIDDEN>
Date: Wed, 26 Mar 2025 18:16:01 +0100
Message-ID: <87r02jk90u.fsf@HIDDEN>
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-Rspamd-Queue-Id: 0E403DDF
X-Spamd-Result: default: False [-6.10 / 15.00]; BAYES_HAM(-3.00)[99.99%];
 NEURAL_HAM(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWO(0.00)[2];
 ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[];
 FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ------
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77266
Cc: 77266 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi!

Ian Eure <ian@HIDDEN> skribis:

> Configuration for xorg is embedded in the various display-manager
> configuration records, and extension support is factored out into the
> `handle-xorg-configuration' macro.  However, the extension mechanism repl=
aces
> the existing xorg-configuration with the supplied one, making it impossib=
le to
> compose configuration from multiple sources.  This patch adds a procedure=
 to
> merge two xorg-configuration records, and calls it within
> handle-xorg-configuration, allowing the config to be built piecemeal.
>
> * gnu/services/xorg.scm (merge-xorg-configurations): New variable.
> (handle-xorg-configuration): Merge xorg configs.
>
> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba

Maybe you can add a word in the relevant part of the manual to give an
idea of how configs are merged.

Apart from, it LGTM.  I can=E2=80=99t think of a scenario where it would br=
eak
existing config or where the current setup is preferable.

Thanks!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Mar 2025 04:24:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 26 00:24:18 2025
Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txIJN-0006jr-L1
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 00:24:18 -0400
Received: from lists.gnu.org ([2001:470:142::17]:46608)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txIJH-0006jU-Ci
 for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 00:24:14 -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 <ian@HIDDEN>) id 1txIJA-0001Jk-Kh
 for guix-patches@HIDDEN; Wed, 26 Mar 2025 00:24:05 -0400
Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ian@HIDDEN>) id 1txIJ8-0005AK-H9
 for guix-patches@HIDDEN; Wed, 26 Mar 2025 00:24:04 -0400
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 392DB1140151;
 Wed, 26 Mar 2025 00:23:59 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-11.internal (MEProxy); Wed, 26 Mar 2025 00:23:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:message-id:mime-version:reply-to:subject:subject:to
 :to; s=fm1; t=1742963039; x=1743049439; bh=jE66/fGQ+XwDQ+QTJXQjH
 C5ip0xRJPzZkR7/E2NM2BY=; b=fztgO4Rw1pwBsojqbaVJdknBsaMp851KGiGGJ
 dFhUrYC0mEMCmzGf2/GNxI7wjWwwLLxULfP9CWDjl1Te2En+rOA/fTPtxLy8tc4B
 HBfya6+CXtBHC7KSFlzCQ/QKmuMw/gDTlTzbpihPbuV+HzSRt68KyfSPw7cQmyhV
 /chhCimsTPJbd8hrfJQUOLJM7u+JsAML0sWSk9F/01nkUVFbn4TcfyF9j4ab4fxQ
 Wz9DV/ROuLOdKi0vKjdw6XFkWBEpGU4n9eFxczttb0cHmalGQuVvv3EqLMKuCgXF
 hGlNlL98VTZjriBVa3gFUx7HZs27QRuvDyC1jfwntcMm83yOQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:message-id:mime-version:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=
 1742963039; x=1743049439; bh=jE66/fGQ+XwDQ+QTJXQjHC5ip0xRJPzZkR7
 /E2NM2BY=; b=V3+RqiZC6HyYFI3u6k6r2fdJZV3K5qJXSWHTq0mhjuq5h/3RjqP
 DJfLKhHbH+oY0IQxB5Offtm73qsEtKGiJrRKzcGzXyIbD+iq2iNzg9x7Ldqz4gUU
 HZVVhI/sG44ugyWY0P4zuAsbJe1Jns24c38WWobZrxJT/veban/Ss0nOsGaZn5zG
 oJU/K5NQvafnZMTA6NuVWVyxF0MXvFFp8rGUrRmyG2soRHYtQKqS8/w+RLDsFFL2
 c9DCSXzIPdqr+3VRuigK1lep9Olul0Yx/8QOlkruI+3uowzeph0swQBXCFFq9Wsu
 szCbkD+nxhWvcnUOHAHbeA17rZ3j2Kp5LCw==
X-ME-Sender: <xms:XoHjZ9AifThhiW9JJOPAQmthU5BKOPFbmGH6g7wGnhyQMVmOkDmmeA>
 <xme:XoHjZ7jORDpsjB6w2T0CId2OUjQSbjy5jMrsysniKbCTJNelUYbqoHyhvmm6emx2l
 vNjPK9vamSbViFaVQ>
X-ME-Received: <xmr:XoHjZ4msBbrkuIZmrsOvtFNGJvlbYGEFGiIC0EYeyrWC2ucTyZIB9PQp8iRG-Jtc5LivOXvaZKmMAEU9Co3RHVni5GOEe40YMw83GfCCw6vIlQRargTWxg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieegheeiucetufdoteggodetrf
 dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
 pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf
 evufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghn
 sehrvghtrhhoshhpvggtrdhtvheqnecuggftrfgrthhtvghrnhephfeiveeliedukeffhe
 fhleeijedtveelleetgefggfehkeeljeehtdeguddvvefgnecuvehluhhsthgvrhfuihii
 vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrth
 hvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehg
 uhhigidqphgrthgthhgvshesghhnuhdrohhrghdprhgtphhtthhopehirghnsehrvghtrh
 hoshhpvggtrdhtvh
X-ME-Proxy: <xmx:XoHjZ3z4nG6kN2UwXxCU4tRfHUcYBW406KWVNCbLOp6xkaGv9-YnMg>
 <xmx:XoHjZyT5qPZbRJXXtmcDL8p1CyhlCm6WHW-9j2XX5boe-VIbUU7BBg>
 <xmx:XoHjZ6YI3zvLSt50F774z1WRAgZRctJfI9aGmYIIEmS1ecq2ufHpDg>
 <xmx:XoHjZzRkYT8smNtYydpJHrV1PDMPc1SRxOb3epCaTPd4M_fzHZsZxg>
 <xmx:X4HjZ9eGhNkl8bxwAbkOq1gExgCbwNcI2EcFUb7NpzaI2zvRbljeAJuG>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 26 Mar 2025 00:23:58 -0400 (EDT)
From: Ian Eure <ian@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Merge xorg configurations when extending.
Date: Tue, 25 Mar 2025 21:23:54 -0700
Message-ID: <20250326042354.14033-1-ian@HIDDEN>
X-Mailer: git-send-email 2.48.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=103.168.172.155; envelope-from=ian@HIDDEN;
 helo=fhigh-a4-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
Cc: Ian Eure <ian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Configuration for xorg is embedded in the various display-manager
configuration records, and extension support is factored out into the
`handle-xorg-configuration' macro.  However, the extension mechanism replaces
the existing xorg-configuration with the supplied one, making it impossible to
compose configuration from multiple sources.  This patch adds a procedure to
merge two xorg-configuration records, and calls it within
handle-xorg-configuration, allowing the config to be built piecemeal.

* gnu/services/xorg.scm (merge-xorg-configurations): New variable.
(handle-xorg-configuration): Merge xorg configs.

Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba
---
 gnu/services/xorg.scm | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index bef05b9bb9..dbd1513cc8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration>
   (server-arguments xorg-configuration-server-arguments ;list of strings
                     (default %default-xorg-server-arguments)))
 
+(define (merge-xorg-configurations a b)
+  (let ((configs (list a b)))
+    (xorg-configuration
+     (modules
+      (delete-duplicates (append-map xorg-configuration-modules configs)))
+     (fonts
+      (delete-duplicates (append-map xorg-configuration-fonts configs)))
+     (drivers
+      (delete-duplicates (append-map xorg-configuration-drivers configs)))
+     (resolutions
+      (delete-duplicates (append-map xorg-configuration-resolutions configs)))
+     (extra-config (append-map xorg-configuration-extra-config configs))
+     ;; Prefer the more recently set layout.
+     (keyboard-layout (or (xorg-configuration-keyboard-layout b)
+                          (xorg-configuration-keyboard-layout a)
+                          #f))
+     (server
+      ;; Prefer the non-default server.
+      (if (eq? xorg-server (xorg-configuration-server a))
+          (xorg-configuration-server b)
+          (xorg-configuration-server a)))
+     (server-arguments
+      ;; Prefer the non-default arguments.
+      (if (eq? %default-xorg-server-arguments
+             (xorg-configuration-server-arguments a))
+          (xorg-configuration-server-arguments b)
+          (xorg-configuration-server-arguments a))))))
+
 (define (xorg-configuration->file config)
   "Compute an Xorg configuration file corresponding to CONFIG, an
 <xorg-configuration> record."
@@ -628,10 +656,7 @@ (define-syntax handle-xorg-configuration
     ((_ configuration-record service-type-definition)
      (service-type
        (inherit service-type-definition)
-       (compose (lambda (extensions)
-                  (match extensions
-                    (() #f)
-                    ((config . _) config))))
+       (compose (cut reduce merge-xorg-configurations #f <>))
        (extend (lambda (config xorg-configuration)
                  (if xorg-configuration
                      (configuration-record
-- 
2.48.1





Acknowledgement sent to Ian Eure <ian@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#77266; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 25 Apr 2025 00:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.