GNU bug report logs - #75270
[PATCH 0/3] services: greetd: Improve greeter configurations.

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: muradm <mail@HIDDEN>; Keywords: patch; dated Wed, 1 Jan 2025 22:49:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 75270) by debbugs.gnu.org; 6 Feb 2025 14:03:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 09:03:51 2025
Received: from localhost ([127.0.0.1]:54965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg2Tv-00016b-Az
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:03:51 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:49444)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>)
 id 1tg2Tt-00016E-Cj; Thu, 06 Feb 2025 09:03:49 -0500
Received: from localhost ([127.0.0.1]:57726)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tg2TL-0000000078U-2tbD;
 Thu, 06 Feb 2025 14:03:15 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=MIqux4snHCGDArMqcnDF4/3+Qq06KsnF8k0vz/zkCdI=; b=SNLC9EtpiCElTLO1HiwcTRoQ66
 T1QP4aZ5PqbhKxR4H+J7WWFUYyLtYdwbwouKNAKKnP4L20aqHfcHZ/Nsr0V4Xu5qxTpEiZ9WtCXi9
 gUhb0pTTeET0OC0zfgriNb7Ac6Ibq7Je05uXNqs0LyfD1vPaW7E0YOfgUS3KttP2H7NBKLFQrdXbi
 sy6UD1y7+OzZfgtf0tpZ6WyXspAjSgY425cmA1rZaioBZpmrJjiX5lynDRvZfaSXDA0CXpm1qFWHF
 Qjn05EsN+v3FvSBQ3LFx/tmEB0jHMHK2UZXgif6cxRbVuksKr+rD+BmIR8A4/rDmzkJcI5HeBPF2p
 1kXNWNQiXEu8q++Y8cXI+axDhEWFonUJNx/UswGgcUEZrNoUTuNo4NMVzHIBTGbPk/7YrNLZYDprz
 PrVVAuqV/3JMeQVJywP0Zh95EOxNT21j9nqD/GAQpeoSMz0Bgwo0HDoySWY5Xppi7eSW/VMdQSpbs
 KRpmGM0U5VEkDN83CE0iHIWl;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tg2Tm-0000000089r-3Mph;
 Thu, 06 Feb 2025 17:03:42 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v6 0/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <8734gr8aff.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 06
 Feb 2025 22:33:40 +0900")
References: <cover.1735771462.git.mail@HIDDEN>
 <cover.1738760538.git.mail@HIDDEN> <8734gr8aff.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Thu, 06 Feb 2025 17:03:42 +0300
Message-ID: <874j17yxtt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 GNU Debbugs <control <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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hi, thanks for reviewing and commiting.

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

> close 64112
> close 65769
> close 70605
> close 70318
> quit
>
> Hi,
>
> muradm <mail@HIDDEN> writes:
>
>> Minor improvements and fixes compared to v5.
>> Adds extra-shepherd-requirement.
>>
>> Improves greeter configuration and adds new gtkgreet greeter.
>>
>> Fixes: https://issues.guix.gnu.org/64112
>> Fixes: https://issues.guix.gnu.org/65769
>> Fixes: https://issues.guix.gnu.org/70605
>> Obsoletes: https://issues.guix.gnu.org/70318
>
> Pushed as commit 220ef58440. Thanks a lot for tackling these 
> various
> issues and for your patience during the review.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmekwT4ACgkQ6M7O0mLO
BeJyrRAA2NSnHzrr7cZjW6d/ZHA838RlxO6NEfmUjfCfGb9gvFtbAYO14s4iVbSZ
3oY7WuyTJsauD7pD/CouM8qeglqrhOe7JomN2Y5YLsH7c5nzUSePyxEcYKbVM7R8
aivpHkxUvd60/A0Yz/fhjnEl6BlNmg0YEayLQ0TMflabuJtbD2FEZ2cGMyAw2YRn
y9q3oacLxSzb6fe5NRI1s+4gtLcWkzIFCNQIB8qGN6ForMQpbGmoCfC9VXUEhaed
16fxRnF+JjXsdlLCMikwk80cBw87urFxq/60bg+ccFBoH+x1rR6U5J2VDRhsENVU
izTqehhawtFPuUpziK1pLqWeAEz2hEjThaKHykYyGd/Lze6T981/9+IA8otGkSNg
gRhVsEZbD3fTOvV9TeyhZmNiMcX4t8hKR9f5GrTOfJpN8wixG5PQdDitim6uqH7q
MhFdSS1hDbW5snnzPxlxIaK5rDVTxeJTwEepKCIH3EtSlek1RT5Zpt5eXnt2m2Sq
XzRdO2Xq28FdPop1S1uAT6tqOS2RNYaBk0JpmqtyUxkJGZSsDz4H2EStmtV4sak3
z5gBgYWX9Uhl5PsEbYzvAPcP1Mr+w5hfbG8yMryBW311+U/SRYfnQj0RTz0XPAHy
4GTax3X4LHkGvAIOFSRnRYFCNgSy2Rp2B6LjYG0a772Z1XGbKNA=
=OKt/
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 6 Feb 2025 14:02:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 09:02:45 2025
Received: from localhost ([127.0.0.1]:54960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg2Sr-00014O-6Y
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:02:45 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55588)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tg2So-000146-Jv
 for 75270 <at> debbugs.gnu.org; Thu, 06 Feb 2025 09:02:43 -0500
Received: from localhost ([127.0.0.1]:59356)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tg2SG-0000000078F-1wxC;
 Thu, 06 Feb 2025 14:02:08 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=StxnSaYeSDIXtw/B96dxmGIH4xNCvFSgN8o8Prcu++8=; b=O95eN/EIzBNC5IBhz5EaOc5qir
 3HGAoQxLPXKsYFx9Wr6OmfK7rxFjxPoM5LboZ1SGf2DsdZCIa71v3Liyiz1/ATgEUYz2giLmHToBl
 rjwksV4vtbf0Pj99XgNILZPaDK1j8aSM/Ltaut5kGqmC2ehKuLLG1sW7ZFETHrWxHzuGsQ0KQE/6N
 0F9sXQ+kWMQyOpqr4IlHRwP8WwK7WVZeNtpCh660W+toUZHGDdUpwaXX5GuyspzVn3CI68B7/yDLE
 cJ2xhsjIbty7UOgTzGUZ5FdhPQyYNyFadZ8TCf8O4ROmQx2AXXvOyS0lVIm89ty7gYzUC6zripA/d
 Z1DG4Ay/sxLqPXWmrhrXt2uS06Q9Gy2liAZkY4pvroqtIjg9bIr+05iKYdJ/gpi0tQFzdTjC1k3DI
 RWID8uY1PNUBKpDDtK0mYHDNdx83GJUr+jMbOh9/+T5KXM8ds5EPVV3/j8FR5dBFup/ps6SDrIAGe
 n77fYkHbzITGYUjbH9HEirc5;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tg2Sg-0000000086m-1D3Q;
 Thu, 06 Feb 2025 17:02:34 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [PATCH v6 1/3] services: greetd: Improve greeter configurations.
In-Reply-To: <87bjvf8bmz.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 06
 Feb 2025 22:07:32 +0900")
References: <cover.1738760538.git.mail@HIDDEN>
 <bc9ce68ef267e88bf7d03f0f7134572e66828701.1738760538.git.mail@HIDDEN>
 <87bjvf8bmz.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Thu, 06 Feb 2025 17:02:33 +0300
Message-ID: <87a5azyxvq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hello,

>> +@item @code{extra-shepherd-requirement} (default: @code{'()})
>> +This option can be used to provide a list of additional 
>> symbols naming Shepherd
>> +services that this service will depend on, such as 
>> @code{'seatd} or
>> +@code{'elogind} when terminal session is graphical greeter.
>
> Neat!  According to git-grep, the most common name for this 
> field is
> 'shepherd-requirement', followed by 'shepherd-requirements'.  I 
> think we
> should standardize on the former (shepherd-requirement), as this 
> gets
> passed as the 'requirement' field value of the underlying
> `shepherd-service' record.

I explicitly named field 'extra-shepherd-requirement' due to its 
implementation. Other places you mention about configure whole 
list of requirements, for instance:

--8<---------------cut here---------------start------------->8---
  (shepherd-requirement 
  mingetty-configuration-shepherd-requirement
                        ;; Since the login prompt shows the host 
                        name, wait
                        ;; for the 'host-name' service to be done. 
                        Also wait
                        ;; for udev essentially so that the tty 
                        text is not
                        ;; lost in the middle of kernel messages 
                        (XXX).
                        (default '(user-processes host-name udev
                                                  virtual-terminal))))

  ;; .... skipped

    (list
     (shepherd-service
      (documentation "Run mingetty on an tty.")
      (provision (list (symbol-append 'term- (string->symbol 
      tty))))

      (requirement shepherd-requirement)
--8<---------------cut here---------------end--------------->8---

Compared to what 'extra-shepherd-requirement' means:

--8<---------------cut here---------------start------------->8---
+  (extra-shepherd-requirement greetd-extra-shepherd-requirement 
(default '()))

-          (greetd-vt (greetd-terminal-vt tc)))
+          (greetd-vt (greetd-terminal-vt tc))
+          (greetd-requirement (greetd-extra-shepherd-requirement 
tc)))
        (shepherd-service
         (documentation "Minimal and flexible login manager 
         daemon")
-        (requirement '(pam user-processes host-name udev 
         virtual-terminal))
+        (requirement `(pam user-processes host-name udev 
virtual-terminal
+                           ,@greetd-requirement))
--8<---------------cut here---------------end--------------->8---

We add to requrements, thus 'extra-shepherd-requirement', compared 
to other overriding requirements.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmekwPoACgkQ6M7O0mLO
BeLf5Q//QN85j8oaFpqKlCrrzDLt2915e74EUcUwg1+ryryjyJergoRaytPUC5FC
KeOpPQ22SwCcT67KH+oDNlaZ4StOSB4ZxBK9WDtA4luTyxNmMd+/FKKUEG9hgy2A
LAT+dekU7SzREDnnsbqIF4r0dAJtapJl2Tt4ebUfc5F3mRSJiOr0KP0bNJFFe2Kt
HO0Kn1QM6Sfhd2FTQ0lT/DS4jvJ6vjO1hE0JPAHTRdkW0cjBalMoF16WLBBOpd2P
zLsQVSa97MIPahQIfbjUFgYgRLpzTId5CeCXINGoJS8zZ4GAD0E1yVxYVsoF4ueK
cyf810PNG8I6+HTmUoWkGWK22VS+sIOzazFitbGbEqSr1wmsTI6U+z71Wq085Mvc
1r7Zu6YLmzNkTKu/VrRu31grFQIXIDRgNWcuG+5GL9TTk8pRqJQhlC/m/Cy8/PPm
SYNmlDWlIvw+f7DnO7f9diKJiQ2NMCxqUac+foSBA4Eof7b0IkOlvBOP5VOhAGxN
oCq1+G3IMIGPYbVIS3d1XO+FCCC21zKEX1ZT7Vc878cIFvlbdF1XAwiu/Wa4HKMh
LjIKGu2zctPjBQ4rnKA2wJNvE2ZDvi+n0+3EO+h4E+83CC3aEUdCxnnNGXR4bX87
w0hfn8RYLFYi7kHF1MnQ+QIC4mmGcjJOENxZ2k4J34jvkUh+JGI=
=tCJl
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 6 Feb 2025 13:34:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 08:34:03 2025
Received: from localhost ([127.0.0.1]:54850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg215-00050z-6Q
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 08:34:03 -0500
Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:59634)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tg211-00050L-W8; Thu, 06 Feb 2025 08:34:00 -0500
Received: by mail-pl1-x634.google.com with SMTP id
 d9443c01a7336-21f3e2b4eceso8525355ad.2; 
 Thu, 06 Feb 2025 05:33:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738848833; x=1739453633; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=bVKThXPNBKNPZpxKFYL3600HPaNcrh/zsypfHJh4mKE=;
 b=CeraDLEwklKCU2I/snxnSe8dK32KoDozsThvuG4YAMZK6rS0If+z6Hdt/uyzDsfxQU
 yZRy6u9qri5ibnGs9iMRWmERm6+1qABiZuLXkO/AHGaezrgMnYNtWLEojA7jbp1ZIcGi
 /EycpNp34CFNiradocWrshCmDD7mE0qxzCfC+3tOK2oZYhfmTAR8hkpfP11Z32XDDLgT
 We1EHCRuu91O/DlaSjDUywlAtFCumDWcc+98RqjIEdMrb7aDR52iOhHLgFWwZUlldhwe
 G2S5PMYhnxD1haB3Jn2RUIf4vhDJE+KeC7+2rCxgNtarNfHicxK49K+SYAWeVBRVeoPd
 xLXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738848833; x=1739453633;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=bVKThXPNBKNPZpxKFYL3600HPaNcrh/zsypfHJh4mKE=;
 b=PDz4sb0x9utu8/osvpKugI5aTHXKHsXtTm/pafcsBzxSN5LVKZoUcqCfETac8fGkZt
 /WfBBgKU+BVdrouFuZfp0UckwsAP+v8KhadEijHNXUwhqkq8yhrkjL+SHc8w+2xmnwRb
 5fCPnHWGEbo2MPoHxA/5xM2QwLxhwYsLr6fdHH+pJsEzTWaH1foVWYNprlJ7mgORE9gS
 wVEvI+8B2cVDTTThxs3XATh1MKVhKxjf1dZ1+MA8PVvZTJYwpqI2TdxQ48FAAArgU+ft
 3JKTawsMixQ+sXgaNfRY+1C/Mba6f9kCBcKhibIUdEoMVp08q6vYUFMy9u2i/MTEa/xr
 n82A==
X-Forwarded-Encrypted: i=1;
 AJvYcCXp1TiaKSnD1QJQNcFQrbqAW7V8JsJoq+NpqWQrB4Yu0HdQ1Vxew/1py+ubGW9fduFbM9BPQhDs <at> debbugs.gnu.org
X-Gm-Message-State: AOJu0YyfBp/f1Vno7dLh0ORuwLWtiwu3i5lMeJx7R7VyS00Scbd/xIdc
 1HxaoiUFV/+RJLkWZeuEJ8vD4O35BGfWwC9SMpgxyo3jLyRw8u+8h2WoVw==
X-Gm-Gg: ASbGncssj2U+Z0DHYzPgtFSqoYUSc1SV+DXdltqTFKRQs1q0fNnkkVmWlfXsQcwvl7G
 8LQv7h9qdXDy/t34Znh7szbLuuBDBg5OYskmNUnGva+1I8bRTjQ1XpFlhR4sul9BBgyxmFbROzL
 oVtKuRE6JxcxvaPEkmcPhG3E1Dc54rXlYIuVGBPQcIXyBQA+rNvSkrIwhq3T+7QJvIpOEYRxD+o
 WErm0s5LcLssnsqZ0ug4zdfUuKA/K9Mms2aPqry/Hvtj5yodxSBZifxMWvf+nhsT+Jka42e1Bgi
 FKCu6cR/EZ2l
X-Google-Smtp-Source: AGHT+IGIUbX3V2eMRc7Fs0Iw90OyFDXhmKusy2/3PIiei2Wnlxy+oglieKpjP4FGgfgbpwX8klBw9A==
X-Received: by 2002:a05:6a20:cfa4:b0:1e0:c77c:450d with SMTP id
 adf61e73a8af0-1ede881140dmr14061824637.1.1738848833542; 
 Thu, 06 Feb 2025 05:33:53 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73048ad2688sm1265558b3a.47.2025.02.06.05.33.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 06 Feb 2025 05:33:53 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v6 0/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <cover.1738760538.git.mail@HIDDEN> (muradm's message of "Wed, 
 5 Feb 2025 16:06:11 +0300")
References: <cover.1735771462.git.mail@HIDDEN>
 <cover.1738760538.git.mail@HIDDEN>
Date: Thu, 06 Feb 2025 22:33:40 +0900
Message-ID: <8734gr8aff.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 GNU Debbugs <control <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.0 (-)

close 64112
close 65769
close 70605
close 70318
quit

Hi,

muradm <mail@HIDDEN> writes:

> Minor improvements and fixes compared to v5.
> Adds extra-shepherd-requirement.
>
> Improves greeter configuration and adds new gtkgreet greeter.
>
> Fixes: https://issues.guix.gnu.org/64112
> Fixes: https://issues.guix.gnu.org/65769
> Fixes: https://issues.guix.gnu.org/70605
> Obsoletes: https://issues.guix.gnu.org/70318

Pushed as commit 220ef58440. Thanks a lot for tackling these various
issues and for your patience during the review.

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 6 Feb 2025 13:25:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 08:25:59 2025
Received: from localhost ([127.0.0.1]:54827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg1tG-0004eG-EZ
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 08:25:58 -0500
Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:57621)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tg1tE-0004e1-Cw
 for 75270 <at> debbugs.gnu.org; Thu, 06 Feb 2025 08:25:57 -0500
Received: by mail-pl1-x631.google.com with SMTP id
 d9443c01a7336-21f40f2bafdso4425985ad.3
 for <75270 <at> debbugs.gnu.org>; Thu, 06 Feb 2025 05:25:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738848350; x=1739453150; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=4HOeFhHyvtyCYayo7SSh6XbHbXRMk9JuvI3Z7fYhEUs=;
 b=aT7Nre0rPx5lh/4UiI/Y0QXJhW27Ow/bCKz+4gAL32CmAbaHSnXBWbBsKcApjscrDi
 Y1KoGz1f3cfPrZsh2MiCeUto+eHlvNqhmD1zHAuj503bYUevgKPj4ndnTDh2gt5UHtmi
 HP2iet4A3BXrLbI2F3I8P0mhaLwcjqCGy2uLTGlg8UaiO0y/PZzntHfpnPvl4HwoeWcU
 97J0i4K8s1dBJZCMnmQQyoUFzR6Yjb6rNedtpdLkdppXVj5W2WDuEgvkqX/w9G/cUaMI
 mFsK5evosmOPJAU2YR8VGlCoVxfuGlVSyEa8KfdMzvNjfk7jvw1o3GgoYJbrA96Vmh51
 SZ3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738848350; x=1739453150;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=4HOeFhHyvtyCYayo7SSh6XbHbXRMk9JuvI3Z7fYhEUs=;
 b=VntNYvoVPtex62goekPXabW7ClMUZb49NUNE27HjGKQ3zBcWhir9t9jb90nsC9RHT5
 KeFvydaJkGkISbeWX8E3Jrg/WA+mii/ri2NX735kEwb+6yMoQK8aE73rA/x5fWFgQ0rK
 /y+jVX/hn/ccquQtKwSc49dPjhlqJhmSuXEmKogBgjy40k4GzSou1bJUjv0tTol4+CRX
 L90ZFAgMcqhTD0wgEUwfh4fjO47NJ8ZmY4d39YTdl8dU5oCpdEunSWRDEhqYsOb5bgSM
 Sb+3TLQ3j9U5wfZjGQmBpL//JUnVWIwaGTPCOvx6i1QlaZjg4q1pR9oAgZmy+tx+sIL3
 O4sw==
X-Gm-Message-State: AOJu0YxUH9vsUAZ+GWu/bVQf/3ZdcC72vKOKXEw8QWZs2kHsG2dhz8IC
 xIl4tQ/EusQeJVt5W3oloyeMbfQ3Gg67z2jCTltynYgJIKJuHzyw
X-Gm-Gg: ASbGnctNcbZLy2aALrzOtuCDIGcHDS1nSmsSzbCb1XXNutveUZzhcwFMrbtHu1HbeYN
 F3gQZdyO+f0cy6rDeTjQ3UJOsU574k1cemlDpE7w3Yk0Z0YyMRodfSn0II57Y1J2grBWiLxHs+o
 D6aIXbIdhfbChMmoJFW+EbO6HgbHXUq844w6wMbxUCTnf8+DhfWzLtb2ig/9U++2NE6uyuLwd7S
 VCMN6gx+gMei7H4NfUKW8ZE6YqQ9R3qU9BooKNn1fEDLXVECpkjmoqM8pPX8KLeQVkXfSQqGbK8
 /fEL8QpERU+7
X-Google-Smtp-Source: AGHT+IE9QyW1fhu/0EzlCogzU+SwArmbvWOQYk0V2b8MCrt3qRTwJjAhMsZv8NItIV2N20COX34aFg==
X-Received: by 2002:a05:6a20:c909:b0:1e1:adfe:c43 with SMTP id
 adf61e73a8af0-1ede8810646mr12149016637.9.1738848349743; 
 Thu, 06 Feb 2025 05:25:49 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73048a9d4a0sm1283937b3a.15.2025.02.06.05.25.47
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 06 Feb 2025 05:25:49 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v6 3/3] services: greetd: Add new gtkgreet
 greeter.
In-Reply-To: <ad55fad26beb7d6d98b106872d24f2574a458238.1738760538.git.mail@HIDDEN>
 (muradm's message of "Wed, 5 Feb 2025 16:09:33 +0300")
References: <cover.1738760538.git.mail@HIDDEN>
 <ad55fad26beb7d6d98b106872d24f2574a458238.1738760538.git.mail@HIDDEN>
Date: Thu, 06 Feb 2025 22:25:37 +0900
Message-ID: <877c638asu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> * gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
> represents 'gtkgreet' greeter session configuration.
> * doc/guix.texi (Base Services): Document new 'gtkgreet' greeter.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN>

I'll merge it shortly.  I took the liberty to make the following
stylistic edits:

--8<---------------cut here---------------start------------->8---
1 file changed, 10 insertions(+), 8 deletions(-)
doc/guix.texi | 18 ++++++++++--------

modified   doc/guix.texi
@@ -20600,8 +20600,9 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
-@code{greetd-gtkgreet-sway-session} or file-like object to use as greeter.
+Can be either @code{greetd-agreety-session},
+@code{greetd-wlgreet-sway-session}, @code{greetd-gtkgreet-sway-session}
+or a file-like object to use as greeter.
 
 @end table
 @end deftp
@@ -20729,8 +20730,8 @@ Base Services
 @end deftp
 
 @deftp {Data Type} greetd-gtkgreet-sway-session
-Configuration record for the gtkgreet greetd greeter.  Can be used as
-following:
+Configuration record for the gtkgreet greetd greeter.  It can be used as
+follows:
 
 @lisp
   (greetd-configuration
@@ -20738,7 +20739,7 @@ Base Services
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
-           ;; Sway requires seatd service.
+           ;; Sway requires the seatd service.
            (shepherd-requirement '(seatd))
            (terminal-vt "1")
            (terminal-switch #t)
@@ -20746,7 +20747,8 @@ Base Services
             (greetd-gtkgreet-sway-session
              (command
               (greetd-user-session
-               ;; Optionally signal to .bashrc that we want wayland compositor.
+               ;; Optionally signal to .bashrc that we want the Wayland
+               ;; compositor.
                (xdg-session-type "wayland")))))))))
 @end lisp
 
@@ -20759,13 +20761,13 @@ Base Services
 the greeter.
 
 @item @code{gtkgreet} (default: @code{gtkgreet})
-The package with @command{gtkgreet} command.
+The package providing the @command{gtkgreet} command.
 
 @item @code{gtkgreet-style} (default: @code{#f})
 Extra file-like CSS stylesheet to customize the GTK look.
 
 @item @code{command} (default: @code{(greetd-user-session)})
-Command to be started by @command{gtkgreet} on successful login, an
+The command to be started by @command{gtkgreet} on successful login, an
 instance of @code{greetd-user-session}.
 
 @end table
--8<---------------cut here---------------end--------------->8---


Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 6 Feb 2025 13:08:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 06 08:08:06 2025
Received: from localhost ([127.0.0.1]:54795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tg1bx-0003hn-VZ
	for submit <at> debbugs.gnu.org; Thu, 06 Feb 2025 08:08:06 -0500
Received: from [2607:f8b0:4864:20::635] (port=50472
 helo=mail-pl1-x635.google.com)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tg1bu-0003h6-0F
 for 75270 <at> debbugs.gnu.org; Thu, 06 Feb 2025 08:08:03 -0500
Received: by mail-pl1-x635.google.com with SMTP id
 d9443c01a7336-2161eb95317so16530495ad.1
 for <75270 <at> debbugs.gnu.org>; Thu, 06 Feb 2025 05:08:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738847265; x=1739452065; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=Ie3jfnbGCLo0J6YjJS8dQLyUwIYffJfo8BB1VnDk31M=;
 b=QEUGxCSdD3sZeQxDBfCc9fKosjvSN9SpbbqL7j6dg3yfKdOJq8Q3Y3z2DCVARaJVmd
 AtBuOcRZ7E2BuyXjmRYTO6h5la88esYr0WBDEhW6mX+p2Tl3G6YBqTJ2wCHjQT219rkG
 Gjkv+S7XCgRNujDjJK1WZELquV9Zz8s+O5I/v3++eiud0eiP9YAdf3RLRIvX+1q9JhCD
 K1vTM+kBrdDRDqqOiC8I/lD8au1tHNsMnY8YEIs1nfVJRajOeTP1GolWGAP8FPit4xnG
 Hp+5+VzHSPP74fdOppAJ3ZYSTuNjBCY23/i3YAq6h0fWjvvhHfTRC+myh2gwZEJEerAu
 mbwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738847265; x=1739452065;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=Ie3jfnbGCLo0J6YjJS8dQLyUwIYffJfo8BB1VnDk31M=;
 b=ShulM0TUouXEURhw0fQkElHGz0FCngkekj/jZWSE6DE7qPXIa/e7PnNUSEbVQiVG3t
 7l85/mbqMReJ+yyW/qidyxNAAHdsNMhOPPtlDnRQ2ngtwxOwMRh/DKIXTkwQxGWRRQGx
 2sQr52d6m/JodZWr3U7eAal1wVYH/NXhY/yzg0KoNfmx81UrVyjTvbVpM0eKENB1uasa
 IHW+Apwyva4BhfvaphQfYzC3l9aCEw3Q+pmgCjoY0qIxHpp36JjVGj7EfNWSwr02Z9WK
 qPrR2qfkLvrrc9qcMMMtMTYQJK88/hiwvQzoOHeY2QXeiDD3AsH0BYlWqyc+fXe5zKG9
 DQaA==
X-Gm-Message-State: AOJu0YwVZD+UoOghsDsbQ5cFJXN1mkCHBqt3MDyzpr7rBPEImBDcnco6
 U+72HbmbTtv3N5gSpci9N59dkKm4/TC4I5Gc73Hk2qA9lNPtChiZI6qYew==
X-Gm-Gg: ASbGnctyqWNggX7ZZZC8Rnom8oxDQPeBZdWWDIkvj9aaQvTJFE9guYXlRDLTzagjgMu
 rlIV6wF4avPfcEzIHiilXFzYOMngYN1jntp+js98oLBWIg8dFrOIObDrKYnpi4S+r4wKF2iGbOq
 lGm87WwM8Bz3lvs5Er14fIAjrAPHBn/Ag4L0f2LcR9gt3HUqxmH2FrFbfQB7KpseWMN6Up5HuxL
 DNo8Gjc+T9mAXSjmEXficvaxdXe9w1RitWL9YvrAiPaTl9QwNMnOuBBlv6JSzajXZvjMK69/SCD
 XJ7qVH/6CO0h
X-Google-Smtp-Source: AGHT+IEJad4IjBh2ULuutizRJgbqNmXpUV8D6q8NEe9bBOhiNM0BqPEfQZKMCiZtfC2MKm+GGwOc+w==
X-Received: by 2002:a17:903:18f:b0:216:3889:6f6f with SMTP id
 d9443c01a7336-21f17df71a1mr106088945ad.17.1738847264893; 
 Thu, 06 Feb 2025 05:07:44 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21f3653ad8fsm12233275ad.61.2025.02.06.05.07.43
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 06 Feb 2025 05:07:44 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [PATCH v6 1/3] services: greetd: Improve greeter configurations.
In-Reply-To: <bc9ce68ef267e88bf7d03f0f7134572e66828701.1738760538.git.mail@HIDDEN>
 (muradm's message of "Wed, 5 Feb 2025 16:09:14 +0300")
References: <cover.1738760538.git.mail@HIDDEN>
 <bc9ce68ef267e88bf7d03f0f7134572e66828701.1738760538.git.mail@HIDDEN>
Date: Thu, 06 Feb 2025 22:07:32 +0900
Message-ID: <87bjvf8bmz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
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:  Hello, muradm writes: [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2607:f8b0:4864:20:0:0:0:635 listed in]
 [list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (maxim.cournoyer[at]gmail.com)
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
X-Debbugs-Envelope-To: 75270
Cc: 75270 <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,

muradm <mail@HIDDEN> writes:


[...]

> +@item @code{extra-shepherd-requirement} (default: @code{'()})
> +This option can be used to provide a list of additional symbols naming Shepherd
> +services that this service will depend on, such as @code{'seatd} or
> +@code{'elogind} when terminal session is graphical greeter.

Neat!  According to git-grep, the most common name for this field is
'shepherd-requirement', followed by 'shepherd-requirements'.  I think we
should standardize on the former (shepherd-requirement), as this gets
passed as the 'requirement' field value of the underlying
`shepherd-service' record.

Also, perhaps s/when terminal session is graphical greeter/when *the*
terminal session is *a* graphical greeter/ ?

The rest LGTM.  I think I'll merge it with this fixup commit of my small
cosmetic changes:

--8<---------------cut here---------------start------------->8---
2 files changed, 23 insertions(+), 18 deletions(-)
doc/guix.texi         | 33 ++++++++++++++++++---------------
gnu/services/base.scm |  8 +++++---

modified   doc/guix.texi
@@ -20571,10 +20571,11 @@ Base Services
 @item @code{greetd} (default: @code{greetd})
 The greetd package to use.
 
-@item @code{extra-shepherd-requirement} (default: @code{'()})
-This option can be used to provide a list of additional symbols naming Shepherd
-services that this service will depend on, such as @code{'seatd} or
-@code{'elogind} when terminal session is graphical greeter.
+@item @code{shepherd-requirement} (default: @code{'()})
+This option can be used to provide a list of additional symbols naming
+Shepherd services that this service will depend on, such as
+@code{'seatd} or @code{'elogind} when the terminal session is a
+graphical greeter.
 
 @item @code{config-file-name}
 Configuration file name to use for greetd daemon. Generally, autogenerated
@@ -20606,12 +20607,13 @@ Base Services
 @end deftp
 
 @deftp {Data Type} greetd-user-session
-Configuration record for the user session command.  Greeters require user
-command to be specified in some or another way.  @code{greetd-user-session}
-provides a common command for that.  Users should prefer POSIX shell commands
-like @command{bash}, which can start an actual user terminal shell, window
-manager or desktop environment with its own mechanism, which would
-be @file{~/.bashrc} in case of @command{bash}.
+Configuration record for the user session command.  Greeters require the
+user command to be specified in some or another way.
+@code{greetd-user-session} provides a common command for that.  Users
+should prefer POSIX shell commands like @command{bash}, which can start
+an actual user terminal shell, window manager or desktop environment
+with their own mechanism, for example via @file{~/.bashrc} in the case
+of Bash.
 
 @table @asis
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
@@ -20625,7 +20627,8 @@ Base Services
 
 @item @code{xdg-session-type} (default: @code{"tty"})
 Specify the value of @code{XDG_SESSION_TYPE}.  The user environment may
-adapt depending on its value (normally by @file{.bashrc} or similar).
+adapt depending on its value (normally by using @file{.bashrc} or
+similar).
 
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
@@ -20640,7 +20643,7 @@ Base Services
 
 @table @asis
 @item @code{agreety} (default: @code{greetd})
-The package with @command{agreety} command.
+The package providing the @command{agreety} command.
 
 @item @code{command} (default: @code{(greetd-user-session)})
 Command to be started by @command{agreety} on successful login, an
@@ -20693,7 +20696,7 @@ Base Services
 prepended to the mandatory part of the configuration.
 
 @item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{wlgreet} command.
+The package providing the @command{wlgreet} command.
 
 @item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
 Configuration of @code{wlgreet} represented
@@ -20714,7 +20717,7 @@ Base Services
    (terminals
     (list (greetd-terminal-configuration
            ;; Sway requires seatd service.
-           (extra-shepherd-requirement '(seatd))
+           (shepherd-requirement '(seatd))
            (terminal-vt "1")
            (terminal-switch #t)
            (default-session-command
@@ -20736,7 +20739,7 @@ Base Services
    (terminals
     (list (greetd-terminal-configuration
            ;; Sway requires seatd service.
-           (extra-shepherd-requirement '(seatd))
+           (shepherd-requirement '(seatd))
            (terminal-vt "1")
            (terminal-switch #t)
            (default-session-command
modified   gnu/services/base.scm
@@ -3750,7 +3750,7 @@ (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
   (greetd greetd-package (default greetd))
-  (extra-shepherd-requirement greetd-extra-shepherd-requirement (default '()))
+  (shepherd-requirement greetd-shepherd-requirement (default '()))
   (config-file-name greetd-config-file-name (thunked)
                     (default (default-config-file-name this-record)))
   (log-file-name greetd-log-file-name (thunked)
@@ -3875,7 +3875,9 @@ (define (greetd-pam-service config)
            pam))))))
 
 (define (greetd-run-user-activation config)
-  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+  #~(let ((d "/run/user"))
+      (mkdir d #o755)
+      (chmod d #o755)))
 
 (define (greetd-shepherd-services config)
   (map
@@ -3885,7 +3887,7 @@ (define (greetd-shepherd-services config)
           (greetd-conf (make-greetd-terminal-configuration-file tc))
           (greetd-log (greetd-log-file-name tc))
           (greetd-vt (greetd-terminal-vt tc))
-          (greetd-requirement (greetd-extra-shepherd-requirement tc)))
+          (greetd-requirement (greetd-shepherd-requirement tc)))
        (shepherd-service
         (documentation "Minimal and flexible login manager daemon")
         (requirement `(pam user-processes host-name udev virtual-terminal

--8<---------------cut here---------------end--------------->8---

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 13:14:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:14:15 2025
Received: from localhost ([127.0.0.1]:49051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tffEM-0001Zi-OJ
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:14:15 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:38592)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tffEK-0001ZV-Ff
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:14:13 -0500
Received: from localhost ([127.0.0.1]:48660)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tffDn-000000006ZK-3urF;
 Wed, 05 Feb 2025 13:13:39 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=k63/kenSIOlO7oAMSXL4kEmuA2GHgbhzyTgszCJnkcM=; b=q1j692uUGzojIftkPDhWzLb86e
 RSaq2npEt4B8qb0t5yhvRa0QdbYww/1gpU8QlLRFVrjoAtZ/h/2t2423UqfQ/YwCVHQ+G5TkmSN90
 b5YrjPrtS7yGBUqZ1RS1FxeYl0gfRmGEYh/vhcliaRq+UxM05OSBkDNYB2eY+oSzOfK42K3eZtcbr
 8SH+9iu3IvYqxHmq/287U48iliTcp2vpgdTOqmmXyfS40roi6QSKp/k4PAEIMlLpBYGp0K/I7Ol13
 nEv6/hhBM27Va1wH7S+Bzp5XLFRbfgBA6ue345JDY3kOw5q2nMFndI2su/sYukMbviHzKl1C+JYgw
 r8xgoY8yqDDHfDyFhrlkPQGp5ajZEv6igia8GyPAyMnQpJn6xOl4Dk0XPbEHCmS05ntKMCrCtn9lV
 icRiocpvVUhttK0uwEXTHqmrTeYvSjxrJbqYdlfxd7PfrvgrIWtndjirDO7SfMq8Wdh25JgtA5oRs
 QkdALl9HldtnCUlAdDU1YB3X;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tffED-000000006Vh-35i6;
 Wed, 05 Feb 2025 16:14:05 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87wme57xyp.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 05
 Feb 2025 14:38:22 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 <87h65jrlrg.fsf@HIDDEN> <877c682axz.fsf@HIDDEN>
 <87tt9bdtxs.fsf@HIDDEN> <87ed0f15xw.fsf@HIDDEN>
 <87wme57xyp.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Wed, 05 Feb 2025 16:14:05 +0300
Message-ID: <87r04czg82.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

>>>>>> -           (sleep 1) ;give seatd/logind some time to start 
>>>>>> up
>>>>>
>>>>> That's a suspicious line which already existed.  It looks 
>>>>> fragile.
>>>>> Is
>>>>> it really necessary?
>>>>
>>>> Unfortunately, there is no good/easy way to conditionally 
>>>> depend
>>>> on elogind or seatd. greetd-service-type and agreety greeter 
>>>> do not
>>>> require
>>>> seat, only sway based greeters may/will want it.
>>>
>>> I meant perhaps waiting 1 second here is no longer necessary? 
>>> 1 s
>>> is
>>> not much at all.  Perhaps added during debug/development of 
>>> the
>>> service
>>> and forgotten?  I'd trying taking it out and see.
>>
>> Unfortunately, if you take it out, you will end up with race 
>> condition
>> when sometimes it works sometimes not. Technically, "sleep 1" 
>> may
>> cause race as well, but for years I didn't have any issue with 
>> it.
>
> OK.  What do other systems do?  Surely, there are better 
> technical means
> to achieve this than sleeping for one second?
>
>> To try it, you have to configure seatd, greetd, and sway based
>> greeter. Then just reboot/restart host until race.
>>
>> One possible is to provide additional greetd configuration that
>> will expose the shepherd requirements. But I think it might
>> will complicate configuration dramatically for end user.
>
> Perhaps there could be a shepherd-requirements field attached to 
> the
> greeter configurations with a sane default value capturing the 
> Shepherd
> requirements, abstracting the complexity to most users while 
> leaving it
> configurable?

Adding extra-shepherd-requirement configuration field in v6.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmejZB0ACgkQ6M7O0mLO
BeK7jQ/+OfSNL0S5C5MC5j/TDXlueK6XPafInXsiPnHsBjEjiUqhOCF11pDBF3yp
fsIBQoRdw83q7chwEjdv790+OSl51dyJfo1rnfgVLNw4hlMnWY0yQZ0fOMtVxjgJ
KaCx2qmGSW+xQIWKaXFjCMmDozGEwcDHgk386SKaN/uvxjXhmHRUvCAMwgoJAOP/
k6qWCh3VzR4qQtek/cZD+BAi3z/5eZY9ujvxOmjzNdvu43oe7h+jGsMrle/6Yvj/
oB9kUU91L/hA070o86T8nIOj2q4GlyrxeT4PdPbL8HM4APeJtEbjJjSGkBKhTR9+
9+JGCtjEt1cBrsnoGTlL8Xx+49DB74uKGombvm3TjwbjL7Be2xDZ1CJBXhk5fIgO
aevWUsPZSZ9FxD1rB3aZouKHHlWwgFTSphYFM+ily6mOe2JUrr3krXN54h3N9IYF
0dDO6k38Xt3vnReYLVtWeSLaakuBL9Ld8U6C98MLvrVuF1lovZ2L717IETtMyaV8
DDQPQjfp72xDDgygU/ah7C/UEhqlYfdpjAtrJoe5qrQj0rKv2fwXJ7GMXGMHBTno
0Qbs1ksRTckJZBT0jbsBu1kUhbuF+agaGVGoB/SCb3MslF7frBB0s/N7ipm9Sewd
RSq9sQ09whtNo+gQbHR3j/jjR17AYAFQLN/fz5wjdCBfhCSF280=
=tT4s
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 13:09:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:09:43 2025
Received: from localhost ([127.0.0.1]:49031 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tff9z-0001LG-0n
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:43 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:37078)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tff9w-0001Kt-6q
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:40 -0500
Received: from localhost ([127.0.0.1]:38314)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff9P-000000006Z3-35TX;
 Wed, 05 Feb 2025 13:09:07 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=1Ve69BhWtAFbUxV5cM7wq8049rWxZXBmJXSNvkSesMA=; b=NfPHYmHpws+5+sBBKaCjr9zale
 KR9yL0DifdkA7rJbDYvtlBAptyNX01XewdpsntmQ9p7lvE4BfhzCnDMFfzBT+Z4i29hD1TIoG1JMK
 yO+2Ws1HvlnNYnGx4nyUFSvi3/GXx8rwwHiUJ7b6YMRzFvNixAFqEXbh4FMfpU70z5YOJuYNxobbz
 OqPvt9GKIBS1ftO4TQn7tkuUsabOrB3JL5xNcgv6Z+HaYWubcOLeGcVHITGlUWiAbfl+N1nk7AyXZ
 640HdBMoVFLmXbYJWHPAk2KdpoJEpiXL9raUuqvi+Ih2f0nME79bVoXfVSCQJuo35fBA/Pmemk/+C
 ZjwUhj+y3K2MBd7lhhUUcbXawxv0NE616geAaLaGT05XsOj8mCyc5U9mCqDJR1UZjEpJJsYqOSjMk
 HLblxX55clUwV8BUrOYEdV/pxfXswsI61ryrJALcZQY5qwFg371M/LcjgFXF446Uuv2tzIKOXg447
 GNoGyunsEhO7aXs1FvCM1YgT;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff9p-000000006Pu-46oJ;
 Wed, 05 Feb 2025 16:09:33 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v6 3/3] services: greetd: Add new gtkgreet greeter.
Date: Wed,  5 Feb 2025 16:09:33 +0300
Message-ID: <ad55fad26beb7d6d98b106872d24f2574a458238.1738760538.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1738760538.git.mail@HIDDEN>
References: <cover.1738760538.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents 'gtkgreet' greeter session configuration.
* doc/guix.texi (Base Services): Document new 'gtkgreet' greeter.

Change-Id: I2e8b5710965faa05795af1d0b2a0e2f774af1d5a
---
 doc/guix.texi         | 47 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/base.scm | 36 +++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2a0fa6b37d1..b25ead9d587 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20599,8 +20599,8 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
-@code{gexp->script} like object to use as greeter.
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
+@code{greetd-gtkgreet-sway-session} or file-like object to use as greeter.
 
 @end table
 @end deftp
@@ -20725,6 +20725,49 @@ Base Services
 @end lisp
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; The graphical greeter requires additional groups membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           ;; Sway requires seatd service.
+           (extra-shepherd-requirement '(seatd))
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             (command
+              (greetd-user-session
+               ;; Optionally signal to .bashrc that we want wayland compositor.
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package providing the @command{sway} and @command{swaymsg} commands.
+
+@item @code{sway-configuration} (default: @code{#f})
+Extra file-like configuration for sway to be included before executing
+the greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{gtkgreet} command.
+
+@item @code{gtkgreet-style} (default: @code{#f})
+Extra file-like CSS stylesheet to customize the GTK look.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{gtkgreet} on successful login, an
+instance of @code{greetd-user-session}.
+
+@end table
+@end deftp
+
 @node Scheduled Job Execution
 @subsection Scheduled Job Execution
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 8c9947c1914..86d8683a520 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -279,6 +279,7 @@ (define-module (gnu services base)
             greetd-wlgreet-session  ; deprecated
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
+            greetd-gtkgreet-sway-session
 
             %base-services))
 
@@ -3710,6 +3711,41 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
         sway
         (make-greetd-wlgreet-sway-session-sway-config s))))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-gtkgreet-sway-session-sway-configuration
+                      (default #f))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style (default #f))
+  (command greetd-gtkgreet-sway-session-command
+           (default (greetd-user-session))))
+
+(define (make-greetd-gtkgreet-sway-session-sway-config session)
+  (match-record session <greetd-gtkgreet-sway-session>
+                (sway sway-configuration gtkgreet gtkgreet-style command)
+    (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+          (swaymsg-bin (file-append sway "/bin/swaymsg")))
+      (mixed-text-file
+       "gtkgreet-sway-config"
+       (if sway-configuration
+           #~(string-append "include " #$sway-configuration "\n")
+           "")
+       "xwayland disable\n"
+       "exec \"" gtkgreet-bin " -l"
+       (if gtkgreet-style #~(string-append " -s " #$gtkgreet-style) "")
+       " -c " command "; " swaymsg-bin " exit\"\n"))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session> (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 13:09:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:09:35 2025
Received: from localhost ([127.0.0.1]:49027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tff9r-0001Ku-FD
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:35 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:50070)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tff9o-0001KV-Nf
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:34 -0500
Received: from localhost ([127.0.0.1]:49264)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff9I-000000006Yz-16bD;
 Wed, 05 Feb 2025 13:09:00 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=7CdiBF2ACjEf+qOi+IDqeBpxXfRied6KFmo2+cQSSHY=; b=tXxiafNUPFBdWF4DF6W6BVYgAv
 B0L8XRIeRAKASa6PiArUWsI1gTYscdfus4+CSICC6KuFeUg2Ouajr7BxAJzmO/69EhNvhwkuBbFhw
 zIgO8W1ZOeWz4T+dnhmmynXiYXu6Icqi3RcDzIIDFsrX9uzt1yEefo4ofczfZWe80CsRJ37f4mwCQ
 nx2cOqez5i0289s1LGfRnJLMpmezgUdRd8r/6CIZ43EXUjAQwXGSQC25owY47k/37vtORjgX6Dnk4
 DxlIynST7mVGziYB9hlE/0CNbzoy6u9CLkUBzY2yAUF3MrPsgrlHaUwONHyP8AYkWo+t+sTe5chY6
 V6IlIayP4rxZGCYsEg9L9QoHc5cxQ2J5X78PrsHK9EdrSzGqbR6COvXw7n3UJTqE98oADcuGAy6bM
 5dVO7lknbIsaaBF9K2i2Nh+PiuTDdTiS9JMxMXMRdXzydeD035RixGUXg7LWC+TN55fOqP7MCkaHV
 7AF6oP+BjK9Z1kWR/L3JiUBF;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff9i-000000006P6-22Mm;
 Wed, 05 Feb 2025 16:09:26 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v6 2/3] gnu: Add gtkgreet.
Date: Wed,  5 Feb 2025 16:09:24 +0300
Message-ID: <27a283d25c176f0dffd64b39a5bfb0fa6496b720.1738760538.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1738760538.git.mail@HIDDEN>
References: <cover.1738760538.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.

Change-Id: Ifd00be82534e14d27ea42d5ec06d8733346d860b
---
 gnu/packages/admin.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8e9dea4e2d9..727d08d262e 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2025 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -6052,6 +6052,29 @@ (define-public wlgreet
 on a GUI toolkit.")
     (license license:gpl3)))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK-based greeter for greetd")
+    (description
+     "GTK-based greeter for greetd, to be run under a compositor such as Cage.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 13:09:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:09:29 2025
Received: from localhost ([127.0.0.1]:49023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tff9j-0001KW-Aw
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:29 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:34234)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tff9e-0001KB-Dq
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:09:25 -0500
Received: from localhost ([127.0.0.1]:39196)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff97-000000006Yv-3VWY;
 Wed, 05 Feb 2025 13:08:49 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=p4ey/6HWjwYQiuuOWkBuhqbeCSRuIGAaqmZyUVRDVik=; b=eTWkurE4W5a+NquLuufl+/ZuZp
 Eax9tEBZED7dVb0gOMV1kLA3ldj8IkY7sPMVF8nJZnpv88nDFnD2/aiVIMvwCJghlvrPJW38Bg1nU
 dBnatUFTMOuY34C17xb3Eb9+PxCH4HgfgiyY4fxmd1sdVWtyn+MqMgve9ESX1ddgiPhMSxSpD3VOl
 mc8unrYFdC6nzFDZjKuaZY9BDICbzS1FcOt7B80HQ7Jo/NCouQze4EX2mhbQBZlcUjRwSiCtdzSFj
 hFwO7c4viZb9CHuP0sG7g7ULowkpIsIoX7ywxPsWsHMpGiAvczchanv2qsAm+l6jfxi+vPXUh0RhJ
 oxQuR3Bv4KzyWNtZpQTY20SkerYYHts0R8HC9scV6Zu1cjIgDXpGk6V35YmFDQNmlE54viZFq9CbY
 Es8JpY+ELbVVvrxXCa3RHhbLOPhYoF1ABV8Df9/Npkss5JYiHUIODubzjxsOvIfoc9k6w4p1FbQ2a
 RhRrTjn59v0yTFwWRNPW8Xc0;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff9Y-000000006OE-0AES;
 Wed, 05 Feb 2025 16:09:16 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v6 1/3] services: greetd: Improve greeter configurations.
Date: Wed,  5 Feb 2025 16:09:14 +0300
Message-ID: <bc9ce68ef267e88bf7d03f0f7134572e66828701.1738760538.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1738760538.git.mail@HIDDEN>
References: <cover.1738760538.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into '<greetd-user-session>', which can be reused
as is with different greeters. By default it uses 'bash' as
first user process. Then user normally starts additional programs
with '.profile' or '.bashrc'. Using 'command', 'command-args' and
'extra-env' one can specify something else, which could be
'dbus-session' wrapped process, some desktop environment or else.
While the above is possible, one is still encouraged to use
'.bashrc', '.profile' or similar.

It also fixes incorrect use of 'XDG_RUNTIME_DIR' for 'wlgreet'.
'wlgreet' requires a compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-configuration>): Refactor 'wlgreet' configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
(<greetd-terminal-configuration>): Add 'extra-shepherd-requirement'
for establishing configurable Shepherd service dependency.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: I9d45a592b355eb9c438be5b1d4d15555ce4956fa
---
 doc/guix.texi         |  84 +++++---
 gnu/services/base.scm | 439 +++++++++++++++++++++++++++++-------------
 gnu/tests/desktop.scm |  14 +-
 3 files changed, 374 insertions(+), 163 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bb5f29277fb..2a0fa6b37d1 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20512,13 +20512,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '("-l"))
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20563,6 +20571,11 @@ Base Services
 @item @code{greetd} (default: @code{greetd})
 The greetd package to use.
 
+@item @code{extra-shepherd-requirement} (default: @code{'()})
+This option can be used to provide a list of additional symbols naming Shepherd
+services that this service will depend on, such as @code{'seatd} or
+@code{'elogind} when terminal session is graphical greeter.
+
 @item @code{config-file-name}
 Configuration file name to use for greetd daemon. Generally, autogenerated
 derivation based on @code{terminal-vt} value.
@@ -20586,21 +20599,23 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command.  Greeters require user
+command to be specified in some or another way.  @code{greetd-user-session}
+provides a common command for that.  Users should prefer POSIX shell commands
+like @command{bash}, which can start an actual user terminal shell, window
+manager or desktop environment with its own mechanism, which would
+be @file{~/.bashrc} in case of @command{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
-Command to be started by @command{/bin/agreety} on successful login.
+Command to be started by @command{agreety} on successful login.
 
 @item @code{command-args} (default: @code{'("-l")})
 Command arguments to pass to command.
@@ -20608,27 +20623,36 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}.  The user environment may
+adapt depending on its value (normally by @file{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
-before starting command. One should note that, @code{extra-env} variables
+before starting command.  One should note that, @code{extra-env} variables
 are set right after mentioned variables, so that they can be overridden.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{agreety} on successful login, an
+instance of @code{greetd-user-session}.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
+Generic configuration record for the wlgreet greetd greeter.
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
@@ -20650,9 +20674,6 @@ Base Services
 @item @code{border} (default: @code{'(1 1 1 1)})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
@@ -20665,28 +20686,41 @@ Base Services
 on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
 
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package providing the @command{sway} command.
 
 @item @code{sway-configuration} (default: #f)
 File-like object providing an additional Sway configuration file to be
 prepended to the mandatory part of the configuration.
 
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{wlgreet} command.
+
+@item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented
+by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{wlgreet} on successful login, an
+instance of @code{greetd-user-session}.
+
 @end table
 
 Here is an example of a greetd configuration that uses wlgreet and Sway:
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; The graphical greeter requires additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
+           ;; Sway requires seatd service.
+           (extra-shepherd-requirement '(seatd))
            (terminal-vt "1")
            (terminal-switch #t)
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
+              ;; Optional extra sway configuration.
               (local-file "sway-greetd.conf"))))))))
 @end lisp
 @end deftp
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 7331c030d71..8c9947c1914 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-session  ; deprecated
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3393,87 +3395,220 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
+                (command command-args extra-env)
+                (program-file
+                 "greetd-user-session-command"
+                 #~(begin
+                     (use-modules (ice-9 match))
+                     (for-each (match-lambda ((var . val) (setenv var val)))
+                               (quote (#$@extra-env)))
+                     (apply execl #$command #$command
+                            (list #$@command-args))))))
+
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+                (command command-args extra-env xdg-session-type)
+                (program-file
+                 "greetd-xdg-user-session-command"
+                 #~(begin
+                     (use-modules (ice-9 match))
+                     (let* ((username (getenv "USER"))
+                            (useruid (passwd:uid (getpwuid username)))
+                            (useruid (number->string useruid)))
+                       (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
+                       (setenv "XDG_RUNTIME_DIR"
+                               (string-append "/run/user/" useruid)))
+                     (for-each (match-lambda ((var . val) (setenv var val)))
+                               (quote (#$@extra-env)))
+                     (apply execl #$command #$command
+                            (list #$@command-args))))))
+
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
 (define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
-    (program-file
-     "agreety-tty-session-command"
-     #~(begin
-         (use-modules (ice-9 match))
-         (for-each (match-lambda ((var . val) (setenv var val)))
-                   (quote (#$@extra-env)))
-         (apply execl #$command #$command (list #$@command-args))))))
-
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
-    (program-file
-     "agreety-tty-xdg-session-command"
-     #~(begin
-         (use-modules (ice-9 match))
-         (let*
-             ((username (getenv "USER"))
-              (useruid (passwd:uid (getpwuid username)))
-              (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
-         (for-each (match-lambda ((var . val) (setenv var val)))
-                   (quote (#$@extra-env)))
-         (apply execl #$command #$command (list #$@command-args))))))
+  greetd-agreety-session make-greetd-agreety-session greetd-agreety-session?
+  (agreety greetd-agreety-session-agreety (default greetd))
+  (command greetd-agreety-session-command
+           (default (greetd-user-session))
+           (sanitize warn-greetd-agreety-session-command-type))
+  (command-args greetd-agreety-command-args
+                (default #nil)
+                (sanitize warn-deprecated-greetd-agreety-command-args))
+  (extra-env greetd-agreety-extra-env
+             (default #nil)
+             (sanitize warn-deprecated-greetd-agreety-extra-env))
+  (xdg-env? greetd-agreety-xdg-env?
+            (default #nil)
+            (sanitize warn-deprecated-greetd-agreety-xdg-env?)))
+
+(define (warn-deprecated-greetd-agreety-command-args value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'command-args #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define (warn-deprecated-greetd-agreety-extra-env value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'extra-env #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define (warn-deprecated-greetd-agreety-xdg-env? value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'xdg-env? #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define-deprecated/alias greetd-agreety greetd-agreety-session-agreety)
+(define-deprecated/alias greetd-agreety-command greetd-agreety-session-command)
+
+(define (warn-greetd-agreety-session-command-type value)
+  (unless (greetd-user-session? value)
+    (warn-about-deprecation
+     "arbitrary command" #f
+     #:replacement '<greetd-user-session>))
+  value)
+
+(define (greetd-agreety-session-to-user-session session default-command)
+  (let ((command (greetd-agreety-session-command session))
+        (command-args (or (greetd-agreety-command-args session)
+                          (greetd-user-session-command-args default-command)))
+        (extra-env (or (greetd-agreety-extra-env session)
+                       (greetd-user-session-extra-env default-command)))
+        (xdg-env? (or (greetd-agreety-xdg-env? session)
+                      (greetd-user-session-xdg-env? default-command))))
+    (greetd-user-session
+     (command command)
+     (command-args command-args)
+     (extra-env extra-env)
+     (xdg-env? xdg-env?))))
 
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let* ((agreety
+          (file-append (greetd-agreety-session-agreety session) "/bin/agreety"))
+         (command
+          (greetd-agreety-session-command session))
+         (command
+          (if (greetd-user-session? command)
+              command
+              (greetd-agreety-session-to-user-session
+               session
+               (greetd-user-session)))))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
+     (program-file
+      "agreety-wrapper"
+      #~(execl #$agreety #$agreety "-c" #$command)))))
 
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     (with-imported-modules '((guix build utils))
+       #~(begin
+           (use-modules (guix build utils))
+
+           (let* ((username (getenv "USER"))
+                  (user (getpwnam username))
+                  (useruid (passwd:uid user))
+                  (usergid (passwd:gid user))
+                  (useruid-s (number->string useruid))
+                  ;; /run/user/<greeter-user-uid> won't exist yet
+                  ;; this will contain WAYLAND_DISPLAY socket file
+                  ;; and log-file below
+                  (user-home-dir "/tmp/.greeter-home")
+                  (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                  (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                  (log-file (string-append (number->string (getpid)) ".log"))
+                  (log-file (string-append user-home-dir "/" log-file)))
+             (for-each (lambda (d)
+                         (mkdir-p d)
+                         (chown d useruid usergid) (chmod d #o700))
+                       (list user-home-dir
+                             user-xdg-runtime-dir
+                             user-xdg-cache-dir))
+             (setenv "HOME" user-home-dir)
+             (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+             (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+             (dup2 (open-fdes log-file
+                              (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+             (dup2 1 2)
+             (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config)))))))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background (default '(0 0 0 0.9)))
+  (headline greetd-wlgreet-configuration-headline (default '(1 1 1 1)))
+  (prompt greetd-wlgreet-configuration-prompt (default '(1 1 1 1)))
+  (prompt-error greetd-wlgreet-configuration-prompt-error (default '(1 1 1 1)))
+  (border greetd-wlgreet-configuration-border (default '(1 1 1 1)))
+  (wlgreet greetd-wlgreet
+           (default #nil)
+           (sanitize warn-deprecated-greetd-wlgreet))
   (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
+           (default #nil)
+           (sanitize warn-deprecated-greetd-wlgreet-command))
+  (command-args greetd-wlgreet-command-args
+                (default #nil)
+                (sanitize warn-deprecated-greetd-wlgreet-command-args))
+  (extra-env greetd-wlgreet-extra-env
+             (default #nil)
+             (sanitize warn-deprecated-greetd-wlgreet-extra-env)))
+
+(define-deprecated/alias greetd-wlgreet-session greetd-wlgreet-configuration)
+
+(define (warn-deprecated-greetd-wlgreet value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'wlgreet #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-command value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'command #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-command-args value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'command-args #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-extra-env value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'extra-env #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (make-greetd-wlgreet-config-color section-name color)
   (match color
     ((red green blue opacity)
      (string-append
@@ -3483,76 +3618,103 @@ (define (make-wlgreet-config-color section-name color)
       "blue = " (number->string blue) "\n"
       "opacity = " (number->string opacity) "\n"))))
 
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (make-greetd-wlgreet-config-color section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default #f))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
+                         (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session)))
+  (wlgreet-session
+   greetd-wlgreet-sway-session-wlgreet-session
+   (default #nil)
+   (sanitize warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session)))
+
+(define (warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session value)
+  (unless (nil? value)
+    (warn-about-deprecation
+     'wlgreet-session #f
+     #:replacement 'wlgreet-configuration))
+  value)
+
+(define (make-greetd-wlgreet-sway-session-sway-config session)
+  (match-record session <greetd-wlgreet-sway-session>
+                (sway sway-configuration wlgreet wlgreet-configuration command)
+    (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+          (wlgreet-config-file
+           (make-greetd-wlgreet-config command wlgreet-configuration))
+          (swaymsg-bin (file-append sway "/bin/swaymsg")))
+      (mixed-text-file
+       "wlgreet-sway-config"
+       (if sway-configuration
+           #~(string-append "include " #$sway-configuration "\n")
+           "")
+       "xwayland disable\n"
+       "exec \"" wlgreet-bin " --config " wlgreet-config-file
+       "; " swaymsg-bin " exit\"\n"))))
+
+(define (greetd-wlgreet-session-to-config session config)
+  (let* ((wlgreet (or (greetd-wlgreet config)
+                      (greetd-wlgreet-sway-session-wlgreet session)))
+         (default-command (greetd-wlgreet-sway-session-command session))
+         (command (or (greetd-wlgreet-command config)
+                      (greetd-user-session-command default-command)))
+         (command-args (or (greetd-wlgreet-command-args config)
+                           (greetd-user-session-command-args default-command)))
+         (extra-env (or (greetd-wlgreet-extra-env config)
+                        (greetd-user-session-extra-env default-command))))
+    (greetd-wlgreet-sway-session
+     (sway (greetd-wlgreet-sway-session-sway session))
+     (sway-configuration
+      (greetd-wlgreet-sway-session-sway-configuration session))
+     (wlgreet wlgreet)
+     (wlgreet-configuration config)
+     (command
+      (greetd-user-session
+       (command command)
+       (command-args command-args)
+       (extra-env extra-env))))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
-    (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+  (let ((s (if (nil? (greetd-wlgreet-sway-session-wlgreet-session session))
+               session
+               (greetd-wlgreet-session-to-config
+                session
+                (greetd-wlgreet-sway-session-wlgreet-session session)))))
+    (match-record s <greetd-wlgreet-sway-session> (sway)
+      (lower-object
+       (make-greetd-sway-greeter-command
+        sway
+        (make-greetd-wlgreet-sway-session-sway-config s))))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
   (greetd greetd-package (default greetd))
+  (extra-shepherd-requirement greetd-extra-shepherd-requirement (default '()))
   (config-file-name greetd-config-file-name (thunked)
                     (default (default-config-file-name this-record)))
   (log-file-name greetd-log-file-name (thunked)
@@ -3625,7 +3787,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3675,6 +3838,9 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3682,10 +3848,12 @@ (define (greetd-shepherd-services config)
          ((greetd-bin (file-append (greetd-package tc) "/sbin/greetd"))
           (greetd-conf (make-greetd-terminal-configuration-file tc))
           (greetd-log (greetd-log-file-name tc))
-          (greetd-vt (greetd-terminal-vt tc)))
+          (greetd-vt (greetd-terminal-vt tc))
+          (greetd-requirement (greetd-extra-shepherd-requirement tc)))
        (shepherd-service
         (documentation "Minimal and flexible login manager daemon")
-        (requirement '(pam user-processes host-name udev virtual-terminal))
+        (requirement `(pam user-processes host-name udev virtual-terminal
+                           ,@greetd-requirement))
         (provision (list (symbol-append
                           'term-tty
                           (string->symbol (greetd-terminal-vt tc)))))
@@ -3706,6 +3874,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 1c32076ccb2..3f861b253b0 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '("-l"))
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 13:06:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 08:06:23 2025
Received: from localhost ([127.0.0.1]:49011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tff6k-0001F7-Sm
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:06:23 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:47572)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tff6i-0001Eq-4J
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 08:06:21 -0500
Received: from localhost ([127.0.0.1]:57068)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff6B-000000006Yh-0vPO;
 Wed, 05 Feb 2025 13:05:47 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:
 From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=XMCjboPlvChq0JCUvsqB8fF+C6AAiZT2fp5k7wQlq0I=; b=rEb9D9+a+InvuwWdR0nNCwKGc8
 vk16L8/AEXOAM9K/d0Sc1QMPGDsUgpBHam7XYU7mm07DFXYYTB7EnIwsRRdP8t3NwX22/LAXFcvtp
 h4qcba2j4Nc1j+1zf4nmcEH0euOx0loOj/cAh5RQv5A/peL8EWFEBKquNNSUh1EoNJsDH62vmhnc4
 X67ArnijkzlGQAEuR2NCVOctsaIuMw6VvBjP0rd2u9VzrY4LhRAje3mk5U2tcD/nlxZKcSlNOSEI3
 EFlG+LLZbZtmEMix5bdgrHblNFo9tF8Unpn42eZIhbh6enFbnFGDrmJKmtfDaPPo825wEuiH20DT4
 jnpEN3xAujVeMqkSeVwg4Ah1d9rZN19z0nTmaWeSC3PnP9xGX4gkUXCoLMnFJ5rik8sFopjnbG0UV
 yvTG7f3+JlFVAZBDua6Eqyi64fEv3pMyxeK1GPxSUEY7NcqqwDIy8Rn9PQbTE9NYCdd7pvVre9zpg
 isk69ywsXryPOIpd2fQJb2U4;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tff6a-000000006K4-0lOP;
 Wed, 05 Feb 2025 16:06:12 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v6 0/3] services: greetd: Improve greeter configurations.
Date: Wed,  5 Feb 2025 16:06:11 +0300
Message-ID: <cover.1738760538.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

Minor improvements and fixes compared to v5.
Adds extra-shepherd-requirement.

Improves greeter configuration and adds new gtkgreet greeter.

Fixes: https://issues.guix.gnu.org/64112
Fixes: https://issues.guix.gnu.org/65769
Fixes: https://issues.guix.gnu.org/70605
Obsoletes: https://issues.guix.gnu.org/70318

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 129 ++++++++---
 gnu/packages/admin.scm |  25 ++-
 gnu/services/base.scm  | 473 +++++++++++++++++++++++++++++------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 477 insertions(+), 164 deletions(-)


base-commit: b64d3168af697ceb2a96e7e2c62bcf418b8a586a
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 05:38:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 00:38:42 2025
Received: from localhost ([127.0.0.1]:47852 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tfY7W-0001TT-CI
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:38:42 -0500
Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:55752)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tfY7U-0001TH-IS
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:38:41 -0500
Received: by mail-pj1-x1030.google.com with SMTP id
 98e67ed59e1d1-2f9cd9601b8so2113386a91.3
 for <75270 <at> debbugs.gnu.org>; Tue, 04 Feb 2025 21:38:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738733914; x=1739338714; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=ZACNYQ+m7O7ujMbVz/8ru35BxBQ44fsLXOcWuwuyNo4=;
 b=gCIlAaRnh1VF2FqMgkcp1ZhMIldaSaHMhizZWSFzRwP5X8yfsa9k1popIl0qEX8Y2H
 2SjRvoA7RUP9qhd8klLEoK0GcjtiWG8jRoopAyjTH2qJ5KmIHVBXcdf7Hp3F/ZwAcPbh
 Cw7z9TrclCb7ZjWLc8nZt0htXU9SprxYslEpG2ZSgUaKCQ08OpT/dHuG2XMemHL2Kf2C
 BMxEqS8UYq7T5Rx+dDNhvNVn2w63JqtzWYZJSDxzfbfZZ62L1iT6bgIu4oGjX5KdDDyI
 QDu4jaMw5p24TiB7gEuTXyIaorthzqVTEQnMh9J4ZfYTqaUKWdzYxU0MnOhHQFBgajzl
 A//g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738733914; x=1739338714;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=ZACNYQ+m7O7ujMbVz/8ru35BxBQ44fsLXOcWuwuyNo4=;
 b=DrYCRZ5lX+31vqiqMt7u7wpY5ayYb0l1pBCfGofwmsdKqjfm7IeGTa5s63DXtaK7XA
 eLDJPMFOToqztClWrf4DyCvYETQUvFkiAfOvIC8u94TSkWS4GXEAKss9pEnONJHxOplL
 ybEd+J4QFrb9K4LHU0OYVtomroCMXPTPi5+2hp1wS1MHpHB4HpTw4XaGfsSncH+TzFJx
 GvmO7Je5IbJbVqcEXxh3Bk/sHBDzcdZqmTgzQFqFwFB9usvjz1AukkNyL9TSmcLiGHzh
 xkhWSKGUJONWUaWuhGtZ09Oc4LepCFWUXFPX5nQ9HruaZb74jLJzcUUuKnU5KVii7qgU
 K3ug==
X-Gm-Message-State: AOJu0Yx9qONw23qRRQpPJqFCvXiRpNvGZWevoLhHnGPvwjjbkjEt2zH/
 CBNvEhWMANmnG0sFH27ghYmaCH0QJRKZ2SGZ+X7t0Rtmsk/HIuTa
X-Gm-Gg: ASbGncv8Cxie7kuuZg3oFFVcLMFLGaQLGvStD48MNiAOgsTZoRjPmLsqUyt07eV3CD4
 0YFm3xxqYiK1+eCu9MTjJyVtfvLx+8rXV+TGACd7rP7YSJCYVi7aG53WtjmlKgks4/6n4veNti/
 fKfossRviCSIHx/i/pCll3RBckFmZ/36O3pefXuUKx/j2H4N84Jx7B2155oh5N9d9FtVwP4JDDJ
 A+aPQUtq+/w5gISmOZ1r8d1WWhbEV3chWjYFAjaCjOQAeJlv5ODlhOS8gnxrqBcKQ615k0H/7HJ
 L1Mg85ubzRtc
X-Google-Smtp-Source: AGHT+IExkETAAOffyp9WweK23cutn4w9O4ILXbe2wh5hJEH1sCtOuJAcY90Cav6sDydiM+/4IVfBWA==
X-Received: by 2002:a17:90b:3a4f:b0:2ee:cddd:2454 with SMTP id
 98e67ed59e1d1-2f9e0792b13mr2559649a91.15.1738733914512; 
 Tue, 04 Feb 2025 21:38:34 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21f089e5b8asm21354505ad.254.2025.02.04.21.38.32
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 04 Feb 2025 21:38:33 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87ed0f15xw.fsf@HIDDEN> (muradm's message of "Mon, 03 Feb
 2025 17:03:23 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 <87h65jrlrg.fsf@HIDDEN> <877c682axz.fsf@HIDDEN>
 <87tt9bdtxs.fsf@HIDDEN> <87ed0f15xw.fsf@HIDDEN>
Date: Wed, 05 Feb 2025 14:38:22 +0900
Message-ID: <87wme57xyp.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: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

[...]

>> OK; so the new version will need some fiddling from users to just
>> build
>> with their current config?  Or are these expected to be rare edge
>> cases?
>
> Problems may occur with complex setups, where commands provided by
> users
> are very different from "bash -l". Knowing in advance all alternatives
> is impossible. Everything sane or default, should work as is, showing
> the warnings on reconfigure.

Thanks for explaining.  That sounds reasonable to me.

[...]

>> See (info '(texinfo) @table):
>>
>>    Write the =E2=80=98@table=E2=80=99 command at the beginning of a line=
, after    a
>> blank
>>    line, and follow it on the same line with an argument that is
>> an
>>    'indicating' command, such as =E2=80=98@code=E2=80=99, =E2=80=98@samp=
=E2=80=99, =E2=80=98@var=E2=80=99,
>> =E2=80=98@option=E2=80=99, or
>>    =E2=80=98@kbd=E2=80=99 (*note Indicating::).  This command will be ap=
plied to
>> the text
>>    in the first column.  For example, =E2=80=98@table @code=E2=80=99 wil=
l cause
>> the text
>>    in the first column to be output as if it had been the
>> argument to a
>>    =E2=80=98@code=E2=80=99 command.
>>
>> I think the 'indicating' command argument to @table is required, so
>> there is no default value.
>
> I have to try, may be next time.
> You want me to update all tables in greetd service documentation?

Yes, that'd be best.  It can be done later in a different submission.

>>>>> -           (sleep 1) ;give seatd/logind some time to start up
>>>>
>>>> That's a suspicious line which already existed.  It looks fragile.
>>>> Is
>>>> it really necessary?
>>>
>>> Unfortunately, there is no good/easy way to conditionally depend
>>> on elogind or seatd. greetd-service-type and agreety greeter do not
>>> require
>>> seat, only sway based greeters may/will want it.
>>
>> I meant perhaps waiting 1 second here is no longer necessary?  1 s
>> is
>> not much at all.  Perhaps added during debug/development of the
>> service
>> and forgotten?  I'd trying taking it out and see.
>
> Unfortunately, if you take it out, you will end up with race condition
> when sometimes it works sometimes not. Technically, "sleep 1" may
> cause race as well, but for years I didn't have any issue with it.

OK.  What do other systems do?  Surely, there are better technical means
to achieve this than sleeping for one second?

> To try it, you have to configure seatd, greetd, and sway based
> greeter. Then just reboot/restart host until race.
>
> One possible is to provide additional greetd configuration that
> will expose the shepherd requirements. But I think it might
> will complicate configuration dramatically for end user.

Perhaps there could be a shepherd-requirements field attached to the
greeter configurations with a sane default value capturing the Shepherd
requirements, abstracting the complexity to most users while leaving it
configurable?

--=20
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 05:34:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 00:34:29 2025
Received: from localhost ([127.0.0.1]:47844 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tfY3R-0001HJ-88
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:34:29 -0500
Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:54488)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tfY3Q-0001H2-0G
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:34:28 -0500
Received: by mail-pl1-x62e.google.com with SMTP id
 d9443c01a7336-21c2f1b610dso151425805ad.0
 for <75270 <at> debbugs.gnu.org>; Tue, 04 Feb 2025 21:34:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738733661; x=1739338461; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=NlWS5fE4eFcqgNOAQQCNW52A6mRsh3hDmqJ03vi2Mpc=;
 b=e97PXDCvrVr7ttcNlZrKIqxIpK7Tk8erjq6EOBOd0SF5x/F3GgahKxlGDtaZu4AeYM
 05CANDmoHDaRgiL9N0gznTgsPMfr4Y7aFbkmWcLIqryv/0hulSHnD6nzqoMrpvwlnKZu
 BBH+I01BhHfTyBZdiJAVWUhIuzQhraVaB8HaiHIfQzMqEtTizEia5iMVV6M93DXBPUOr
 KSOCX5ZA7ZJ39QXhtVp1zikJ9aqx/fo1GHHOVDEb8IpcbojVg9aacJ7uR/ArAOXyABwN
 J12V7ungbbToFr00c5/5Cuss8DRZADNWc7tTQB/JBl4UvnwV4yzKjAOcCoR8iNhGaTBZ
 QPcA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738733661; x=1739338461;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=NlWS5fE4eFcqgNOAQQCNW52A6mRsh3hDmqJ03vi2Mpc=;
 b=GirDPCgBybJFaCvcXFajnN700miDgxr9WLXoZut1TDMvCQtG2ZbOJ8YPjdR4GAZLI1
 av1c5aIDjl5RsXJkQiT9YSd3wDbGu06srZGwXBNgTPIZorgGtr5PUFXgRaaQYiDlSxwi
 wI2FaVCtHc1su6wpjguV0TGuRsv4y+LQGu9IfnCXW9PvOdEiiGyaeubm87zgNnTTXTeI
 TxC4oP+dhRLQxrpTEG+oL9jvtyEKSKYof7NEOumHfb53638bGRoSGzU9Hly8O+SSSDU5
 zfTFKJtr1jFCxIzu4jmFk5qx6QA7nqcCn9Z324JK9evpouwEhuU9Df6rbFBA3TA5UL7s
 AUbg==
X-Gm-Message-State: AOJu0Yz1EGwldcJMlq9AiLnUtZTCcn/oxCN+36LYDIdMv/Ah4RGYDwsC
 Ea003iOExVI8uaz5cFbmeo6dgZlFd9dVkHBvZ9knU4ClDXurgWub9fhpKl+S
X-Gm-Gg: ASbGncstOVh6fPKoAyucqxB1qpHh3EVIlQvjFsG2MaY6G2lkOqs0BneNerROhlXFuKT
 pDYZcoa5IV/f/V6NNbAIC4lkCkt4KMU+hbEverneu9QBMtmQB4qphLB3cPFv7dJQ0dWa2onW6sL
 Xv5/qJNSxIVzhDqD490JHft21qWIbufUKXmq4mCN6YlUtEJiI5YsBl6YzbqDvt8Y8SdhT1AHxAB
 QghaczDFXpGbspX7qhP+4M0pMS1pEQYtTajLpxXGICPghedURIwZ6/LdsJIKVSqsJORoJ6tbQyW
 ZbApcFfROM+8
X-Google-Smtp-Source: AGHT+IE9UIieDN0x4Trn5kKVh1lJvz1WDis+s9ifnk5m7Vp0uhcDTzKjmbzTONnlAPuP1pkgq9XiQA==
X-Received: by 2002:a05:6a21:918b:b0:1ed:a6d7:3ac8 with SMTP id
 adf61e73a8af0-1ede87fbb2amr3133718637.7.1738733660956; 
 Tue, 04 Feb 2025 21:34:20 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-72fe69bbb5dsm11918419b3a.97.2025.02.04.21.34.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 04 Feb 2025 21:34:20 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [PATCH v5 3/3] services: greetd: Add new gtkgreet greeter.
In-Reply-To: <745d6966766cbe382bf9a07a19f5f33329ac17af.1738536455.git.mail@HIDDEN>
 (muradm's message of "Mon, 3 Feb 2025 01:54:53 +0300")
References: <cover.1735771462.git.mail@HIDDEN>
 <745d6966766cbe382bf9a07a19f5f33329ac17af.1738536455.git.mail@HIDDEN>
Date: Wed, 05 Feb 2025 14:34:08 +0900
Message-ID: <871pwd9cq7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> * gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
> represents `gtkgreet` greeter session configuration.
> * doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Nitpick: I'd use straight quote in GNU Change Log messages; back quotes
are very much Markdown :-).

[...]

> +(define make-greetd-gtkgreet-sway-session-sway-config
> +  (match-lambda
> +    (($ <greetd-gtkgreet-sway-session>

You should use a regular lambda + the Guix-provided 'match-record'
syntax.

> +        sway sway-config gtkgreet gtkgreet-style command)
> +     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
> +           (swaymsg-bin (file-append sway "/bin/swaymsg")))
> +       (mixed-text-file
> +        "gtkgreet-sway-config"
> +        (if sway-config "include " "")
> +        (if sway-config sway-config "")
> +        (if sway-config "\n" "")

Seems these if block can be grouped as one.

> +        "xwayland disable\n"
> +        "exec \"" gtkgreet-bin " -l"
> +        (if gtkgreet-style " -s " "")
> +        (if gtkgreet-style gtkgreet-style "")

Likewise.

The rest LGTM.

Could you send a v6 revision of the whole series?

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 5 Feb 2025 05:27:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 05 00:27:28 2025
Received: from localhost ([127.0.0.1]:47826 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tfXwd-0000yh-Cx
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:27:27 -0500
Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:57479)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tfXwa-0000yL-Fk
 for 75270 <at> debbugs.gnu.org; Wed, 05 Feb 2025 00:27:25 -0500
Received: by mail-pj1-x1030.google.com with SMTP id
 98e67ed59e1d1-2f9b91dff71so2662309a91.2
 for <75270 <at> debbugs.gnu.org>; Tue, 04 Feb 2025 21:27:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738733237; x=1739338037; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=N/522p5LMlGasoaveAUtEPKqtnyUWZR+nQ+cCpngl28=;
 b=NxoHzWxVs30ZcZD3VtXKtbMHoa0U9CY9wgIsf+9oF1yK0rcf/68cLflzdvt0uCILsi
 P1ZktWZe2swgl0yczKvZ/PQezPqz8iRE9h/wNW0pgkojcTtVk0UMhxm6pCcvexlyxa6d
 GzeP8kNOisl1wPbevoIv/osXjqjjlDtYqB+f7ABJDUsJXEY7yTX9NklbTf4QcIBbHg6U
 WpmCYpYB6hB8RupBIhOvJugc7oytFBe4eISEXFVMHNIv5dNCELqvWGSuRORkixAgWsNi
 RJuOcM6Z9vtQrGXrIqf8Stlc1LSAGJGbBYDOgt2Z/F4/zZRo6+ePkeZ4BuZaNVPtOLHg
 EScw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738733237; x=1739338037;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=N/522p5LMlGasoaveAUtEPKqtnyUWZR+nQ+cCpngl28=;
 b=vLNSpIYFappHIvQvliOp/CFTNuh8qHfYTx8EQYlRgQ5vFrsoFnXpYznupemXlma/Oh
 eEcC5+bMDmv2bjY4gUvSsdIH4DTiN4WzyWpnmYO8xKICBPZ/CovfzXEwLvlhd2URZW8V
 CF3FRu9KBKZRHDRttEXd3k7anIbPUhYigZv5rFvC+cW3jw7ZwBmlfcIaJyR0tHy7VrQW
 knRYUMuxNGdi/d+d15xNdNkLSHHMSwk2p6T/04GUYbHdS7vjGkqSQj0El8FjKl5uYqL4
 7hc2IeUi/eAEvjiL6/p6z1XqTCh31ZSvpyRC0KCqwO+4rBpkC6E6KX7QRZXgVC0ez7Lt
 b4Ww==
X-Gm-Message-State: AOJu0YwAlaAk1PBpGoF1ZMeG0vrLpPYsIR7O3Yod5MiCK3kJn+KdAv7T
 eAUpYeHBFEYjU6WlZ2fNMC8skU7O6XpwjRVKXVmWC5eoSJC5eC0TS5kVSgrv
X-Gm-Gg: ASbGnctyHVJ9yzdgxahi09HtsQ69fTG1ux5+tHvFlmVxMN3GbW4qqUJ8ZdPwTho02wq
 zg+awPmsjpkelCs7PeIkExdXB9+oIPUEu7sBnrPERrJm7eXvc1BZOBq4NpPknsK+oHaHVDH25hH
 9GD5xfNiUvTuOY2vtudZxnYJPwPgDWiacZLHSe7na3jLCms8uiXKRD5u1yLvjyFQtQvUT+nmD8E
 LEGkzSMPWVpgwcvsPwGUHk3iWFUeM2pWIAVq4xSLycddctVLrhFhcxgYOFb1DszY/g1nSxr46Ev
 GUGLNolXTiQ8
X-Google-Smtp-Source: AGHT+IG3jkn4tWtKzb08YlKPsatIllQmvB0PhKaz5An+OACrMw8sbJuM/u2eFlusyovRwhf/ppuaIQ==
X-Received: by 2002:a17:90b:38c5:b0:2f1:2fa5:1924 with SMTP id
 98e67ed59e1d1-2f9e08003acmr2056394a91.26.1738733237306; 
 Tue, 04 Feb 2025 21:27:17 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2f9e1da8543sm556543a91.34.2025.02.04.21.27.15
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 04 Feb 2025 21:27:16 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [PATCH v5 1/3] services: greetd: Improve greeter configurations.
In-Reply-To: <81ca14e1ce416e71e56593e5dcb75fc50699eaca.1738536455.git.mail@HIDDEN>
 (muradm's message of "Mon, 3 Feb 2025 01:54:21 +0300")
References: <cover.1735771462.git.mail@HIDDEN>
 <81ca14e1ce416e71e56593e5dcb75fc50699eaca.1738536455.git.mail@HIDDEN>
Date: Wed, 05 Feb 2025 14:27:05 +0900
Message-ID: <875xlp9d1y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <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.0 (-)

Hi again!

muradm <mail@HIDDEN> writes:

[...]

> +@item @code{xdg-session-type} (default: @code{"tty"})
> +Specify the value of @code{XDG_SESSION_TYPE}.  The User environment may

s/User/user/

[...]

> +(define-record-type* <greetd-user-session>
> +  greetd-user-session make-greetd-user-session greetd-user-session?
> +  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
> +  (command-args greetd-user-session-command-args (default '("-l")))
> +  (extra-env greetd-user-session-extra-env (default '()))
> +  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
> +  (xdg-env? greetd-user-session-xdg-env? (default #t)))
> +
> +(define (make-greetd-user-session-command config)
> +  (match-record config <greetd-user-session>
> +                (command command-args extra-env)
> +                (program-file
> +                 "greetd-user-session-command"
> +                 #~(begin
> +                     (use-modules (ice-9 match))
> +                     (for-each (match-lambda ((var . val) (setenv var val)))
> +                               (quote (#$@extra-env)))
> +                     (apply execl #$command #$command (list #$@command-args))))))

Please break long lines under 80 chars.

> +
> +(define (make-greetd-xdg-user-session-command config)
> +  (match-record config <greetd-user-session>
> +                (command command-args extra-env xdg-session-type)
> +                (program-file
> +                 "greetd-xdg-user-session-command"
> +                 #~(begin
> +                     (use-modules (ice-9 match))
> +                     (let* ((username (getenv "USER"))
> +                            (useruid (passwd:uid (getpwuid username)))
> +                            (useruid (number->string useruid)))
> +                       (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
> +                       (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
> +                     (for-each (match-lambda ((var . val) (setenv var val)))
> +                               (quote (#$@extra-env)))
> +                     (apply execl #$command #$command (list #$@command-args))))))

Please break long lines under 80 chars.

[...]

> +  greetd-agreety-session make-greetd-agreety-session greetd-agreety-session?
> +  (agreety greetd-agreety-session-agreety (default greetd))
> +  (command greetd-agreety-session-command
> +           (default (greetd-user-session))
> +           (sanitize warn-greetd-agreety-session-command-type))
> +  (command-args greetd-agreety-command-args
> +                (default #nil)
> +                (sanitize warn-deprecated-greetd-agreety-command-args))
> +  (extra-env greetd-agreety-extra-env
> +             (default #nil)
> +             (sanitize warn-deprecated-greetd-agreety-extra-env))
> +  (xdg-env? greetd-agreety-xdg-env?
> +            (default #nil)
> +            (sanitize warn-deprecated-greetd-agreety-xdg-env?)))
> +
> +(define (warn-deprecated-greetd-agreety-command-args value)
> +  (when (not (nil? value))

#nil.  Interesting, I had never used it.  You should use 'unless' here
instead of 'when ... not' though.

> +    (warn-about-deprecation

Despite being public, this particular deprecation procedure is not the
best, as it deosn't handle the source location itself.  I've tested the
following successfully:

> +     'command-args #f
> +     #:replacement '<greetd-user-seesion>))
> +  value)

There's a typo, here and for the other deprecation procedures:
s/seesion/session/

Ideally deprecation warns and the configuration records are
automatically rewritten to the modern equivalent in the code, which
means only one code path in the service exists for one given option, but
I don't think that's possible here given the new command record replaces
multiple fields, so OK.  I couldn't find a way to preserve the syntax
source info too, in my quick experiment.

[...]

> +(define-record-type* <greetd-wlgreet-configuration>
> +  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
> +  greetd-wlgreet-configuration?
> +  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
> +  (scale greetd-wlgreet-configuration-scale (default 1))
> +  (background greetd-wlgreet-configuration-background (default '(0 0 0 0.9)))
> +  (headline greetd-wlgreet-configuration-headline (default '(1 1 1 1)))
> +  (prompt greetd-wlgreet-configuration-prompt (default '(1 1 1 1)))
> +  (prompt-error greetd-wlgreet-configuration-prompt-error (default '(1 1 1 1)))
> +  (sway greetd-wlgreet-sway-session-sway (default sway))
> +  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
> +                      (default #f))
> +  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
> +  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
> +                         (default (greetd-wlgreet-configuration)))
> +  (command greetd-wlgreet-sway-session-command (default (greetd-user-session)))
> +  (wlgreet-session
> +   greetd-wlgreet-sway-session-wlgreet-session
> +   (default #nil)
> +   (sanitize warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session)))
> +
> +(define (warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session value)
> +  (when (not (nil? value))
> +    (warn-about-deprecation
> +     'wlgreet-session #f
> +     #:replacement 'wlgreet-configuration))
> +  value)
> +
> +(define make-greetd-wlgreet-sway-session-sway-config
> +  (match-lambda
> +    (($ <greetd-wlgreet-sway-session>
> +        sway sway-config wlgreet wlgreet-config command)
> +     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
> +           (wlgreet-config-file
> +            (make-greetd-wlgreet-config command wlgreet-config))
> +           (swaymsg-bin (file-append sway "/bin/swaymsg")))
> +       (mixed-text-file
> +        "wlgreet-sway-config"
> +        (if sway-config "include " "")
> +        (if sway-config sway-config "")
> +        (if sway-config "\n" "")
> +        "xwayland disable\n"
> +        "exec \"" wlgreet-bin " --config " wlgreet-config-file
> +        "; " swaymsg-bin " exit\"\n")))))
> +
> +(define (greetd-wlgreet-session-to-config session config)
> +  (let* ((wlgreet (or (greetd-wlgreet config)
> +                      (greetd-wlgreet-sway-session-wlgreet session)))
> +         (default-command (greetd-wlgreet-sway-session-command session))
> +         (command (or (greetd-wlgreet-command config)
> +                      (greetd-user-session-command default-command)))
> +         (command-args (or (greetd-wlgreet-command-args config)
> +                           (greetd-user-session-command-args default-command)))
> +         (extra-env (or (greetd-wlgreet-extra-env config)
> +                        (greetd-user-session-extra-env default-command))))
> +    (greetd-wlgreet-sway-session
> +     (sway (greetd-wlgreet-sway-session-sway session))
> +     (sway-configuration (greetd-wlgreet-sway-session-sway-configuration session))

Line width > 80 :-)

Part from these nitpicks:

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 3 Feb 2025 14:03:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 09:03:36 2025
Received: from localhost ([127.0.0.1]:38360 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tex31-0000PR-Gw
	for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 09:03:35 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:34290)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tex2y-0000P0-Kl
 for 75270 <at> debbugs.gnu.org; Mon, 03 Feb 2025 09:03:33 -0500
Received: from localhost ([127.0.0.1]:50406)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tex2U-000000005Gd-1v8g;
 Mon, 03 Feb 2025 14:03:02 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=6rHM7u738IRK+l6TwRqNeoTrZTOJi5mh5HO21DxZ1PM=; b=gRkboKm1/E4MCOLs/y4y4INa77
 KwRw2w8fHu5+03xvcjVeXZMik42suKqHBJDwePR2rbDdyPsPeFBSjV6tW14W4QmAoH++SqAWuqtSn
 wJ9hy/+kpQh8pswZehoDLdfT2t4+kK8SriRASFba+PPQWOXdZ1DVdW+Bw4LzgpAFyEI4wlJpkoW87
 AkUQ7ir0aFTAFkuQ1+uauv5iecx1nd1G147GTvD1STsJeY5FLaCODCx0FlMVQS194wvLnk06sy9ib
 BrUKOpLGpjDf6m9hG1TJEPo6cwswWuuQPFaa1wmG/pgKuxnfYmxKL1MzgeuLPcdOZZ1AttvWBP1EO
 JCtsqAgmIOfmQhevcIIt7EPSHoqAmpxqFibTlMSMVjLmbPoVEEnVFZRM2iKW9wATfSlht/g1J6m+e
 GfEHVDsn8Hd39k0jwZbbGIzDhsa+1Nzj2YHRNuBKO7GeiClhCr40lWg2VdMuqTYiZMrYEnL4uvkvF
 O8a6dtJ96y2siogdHF2YYfqB;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tex2p-000000005zx-2Hhl;
 Mon, 03 Feb 2025 17:03:23 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87tt9bdtxs.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 03
 Feb 2025 22:44:15 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 <87h65jrlrg.fsf@HIDDEN> <877c682axz.fsf@HIDDEN>
 <87tt9bdtxs.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Mon, 03 Feb 2025 17:03:23 +0300
Message-ID: <87ed0f15xw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable


Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

>>> You are changing the public API rather drastically.  You need=20
>>> to
>>> come up
>>> with a mechanism that will warn & automatically rewrite the=20
>>> legacy
>>> form
>>> to the new form in the meantime, which I'm afraid won't be=20
>>> trivial
>>> given
>>> the disruptive overhaul.  There are examples among other=20
>>> services;
>>> it
>>> typically involves defining a man-in-the-middle field=20
>>> sanitizer that
>>> takes the old value, updates it to the new expected one while
>>> emitting a
>>> deprecation warning.
>>
>> Done. It should be noted that it is impossible to cover all=20
>> possible
>> cases
>> to provide solid backward compatibility. Uses of file-like=20
>> objects
>> increase variations.
>
> OK; so the new version will need some fiddling from users to=20
> just build
> with their current config?  Or are these expected to be rare=20
> edge cases?

Problems may occur with complex setups, where commands provided by=20
users
are very different from "bash -l". Knowing in advance all=20
alternatives
is impossible. Everything sane or default, should work as is,=20
showing
the warnings on reconfigure.

>>> Looks like all the tables can use '@table @code' instead of=20
>>> @asis,
>>> then
>>> you can remove all the @code decorators for each items.  This=20
>>> could
>>> be
>>> done in a prior commit.
>>
>> I didn't find any use of '@table @code' which document default=20
>> values.
>
> See (info '(texinfo) @table):
>
>    Write the =E2=80=98@table=E2=80=99 command at the beginning of a line,=
 after=20
>    a blank
>    line, and follow it on the same line with an argument that is=20
>    an
>    'indicating' command, such as =E2=80=98@code=E2=80=99, =E2=80=98@samp=
=E2=80=99, =E2=80=98@var=E2=80=99,=20
>    =E2=80=98@option=E2=80=99, or
>    =E2=80=98@kbd=E2=80=99 (*note Indicating::).  This command will be app=
lied to=20
>    the text
>    in the first column.  For example, =E2=80=98@table @code=E2=80=99 will=
 cause=20
>    the text
>    in the first column to be output as if it had been the=20
>    argument to a
>    =E2=80=98@code=E2=80=99 command.
>
> I think the 'indicating' command argument to @table is required,=20
> so
> there is no default value.

I have to try, may be next time.
You want me to update all tables in greetd service documentation?

>>>> -           (sleep 1) ;give seatd/logind some time to start=20
>>>> up
>>>
>>> That's a suspicious line which already existed.  It looks=20
>>> fragile.
>>> Is
>>> it really necessary?
>>
>> Unfortunately, there is no good/easy way to conditionally=20
>> depend
>> on elogind or seatd. greetd-service-type and agreety greeter do=20
>> not
>> require
>> seat, only sway based greeters may/will want it.
>
> I meant perhaps waiting 1 second here is no longer necessary?  1=20
> s is
> not much at all.  Perhaps added during debug/development of the=20
> service
> and forgotten?  I'd trying taking it out and see.

Unfortunately, if you take it out, you will end up with race=20
condition
when sometimes it works sometimes not. Technically, "sleep 1" may
cause race as well, but for years I didn't have any issue with it.

To try it, you have to configure seatd, greetd, and sway based
greeter. Then just reboot/restart host until race.

One possible is to provide additional greetd configuration that
will expose the shepherd requirements. But I think it might
will complicate configuration dramatically for end user.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmegzKsACgkQ6M7O0mLO
BeL9+g//dKGvwvHM0zvdXpYtD7uYYcCR7DenYkLPMxqnqisFOOxIVHpIPafLEJN+
wrofJNjKei58mGlW+zgDZ/98cltFF8D0UhnAQd6LYgP9Zra+E66FVBx3Ozy23iJP
ZW+0UP0RP/9SMpR9k0zkc0a+9lE2DcMiu2XlUhNb1+TTAAifg8SXL5ruH2NgDaKu
DFeCP+4vvhJqXkd4jOAYCNup8pZo3kHiFE+g/j660Fw3/4yFZ10uZSCUMyg2SJg4
Hc+mOhAdcQvFFysEGxY5wP5RX2Sm/C3gBzGgzaqcvm4q6CpJ7rpGGGlmPhpm3/Sy
5svaG1sa29oNo6eb+t5YW5HRvQiytSSCQJDJIYsXkwMSWKmQI6DDU/fVfba06HAO
CcJF0m9jNAu6kq/Y+BBVUGAx1yKLbA2LJIH+/BEQ4VzzAGJMSOgaxSAbL2UJiKBq
2sVa63NxJrq19+cskKpG7FwUX4yiUWdXH90C2f81PhNHce8a4k7khCNPLHNaIcNz
vf3QSpFnD6a2SBpOBn7UneZ8e7mA2DoqYLNYatjRWZGy1fG8xWuXSdlKpGQtvxCk
Ynq4wycmjyjcfmNWT8l7/HLz/T3oQErOSgN1HSq5Ep6BKZdhnL0z55Xv/FAVmfpU
fF1q8Lyt5HtSj5GM6Cp3oogoUixJDQvsSEx0IDfK2IgdcXaeTN0=
=bcT1
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 3 Feb 2025 13:44:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 08:44:37 2025
Received: from localhost ([127.0.0.1]:38332 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tewkf-0007w2-0Q
	for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 08:44:37 -0500
Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:53684)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tewkc-0007vm-7W
 for 75270 <at> debbugs.gnu.org; Mon, 03 Feb 2025 08:44:34 -0500
Received: by mail-pl1-x636.google.com with SMTP id
 d9443c01a7336-21619108a6bso72187805ad.3
 for <75270 <at> debbugs.gnu.org>; Mon, 03 Feb 2025 05:44:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738590268; x=1739195068; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=vFWKAjvALu7lrRuANQYJJqcfc6z+cAlXRIai1rOHYHI=;
 b=hO4sy17g/pne1ujFPZH3YiBm9uTOdYZ+zeGoTT2UCWi4l5IMIOaNeROz8/J+wWudpb
 tCYwT6zVvJLdm4Ji6Gkp4rr1xEKQ5blvqk2K6X7MdeRJ40TM3+UjGTcF839zVS9wleM4
 dyPUdc2BDqpw7o7QCwJhS+3pt8UKOVgD739iw/ca7yh/K+VpwCpSCrnM4zkEdlRladsZ
 MS6jvlhLl9U4C626sk+009tt3yee7B9c9FYv0eJyIbuKtoot1H91sBSCscutZnVOhR1c
 2W/3EC325XQoGRbJ9lY0+t/k0EzH/xnUwriyBnPnfaXiE3N8RdF7l2naO+TQ0qS6khdD
 kQcg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738590268; x=1739195068;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=vFWKAjvALu7lrRuANQYJJqcfc6z+cAlXRIai1rOHYHI=;
 b=IPFitSAGO4Ixd2HriU5AOFpU+CVDyeufqJYEZHjJXCh+ObqFrkEddtvlY+dAgJLPxo
 eIPpqXPbHs5C8FPEjMPSMxSbCgj+3SVrl9Y5yf3YfLad/fJPJnfbx0DW0XMRvGKNILjr
 fX5wr+zloELhdNEI75IQzhWJ3XmGhbVSg2Y4f/3zYTP+dZIQ7A7FL26S8byPFMQKBTWu
 XHTBJ3K8sEGKMwhzYumPpAJEBSoOqYcuYyLFHNTnpo8Srn5v+puLGl1rcmdESThXWSWt
 +Z0r3oVajNJG1Q5uvomxoAgI9Dw+67ZNyUNluUxQAYMpP7XW4ZRIFsEHcsKrn/JJbuCZ
 maGQ==
X-Gm-Message-State: AOJu0YzMwnpgXa8mYiz09GPM+bls1+bydlds/JWKPtkCRs9YsDbBL2Ny
 /C6hzFjYmXDMaemcH2WKC+2s4d+csQWnMC+zQo2BhcuAMtYm8rXv
X-Gm-Gg: ASbGnctTayTvAepHUR/9hQVdVZaNuDkEWjzBIy1Q8e/Fs6RrkbOCpmn4XqQR7gTsLqT
 YN2ba7LYaEW7+W8F3EFyqO2n0RMfehVlobqx50LtiKbQgQlbO2J71LIMnxQtL1uG+zhQ3gtvO5q
 9BevAZO4hKWtJRUqu3F8WMOGxCUy17zq9QIh8QRKgD4apNa9/RKZ3rJhb6GKYmTYl33QXUzBcYA
 mT9TmTRBYbRY7gA9pPfQNM7gabdxyJyyy3BkvxtYYEgOpu5ZwznUjG4nQr9H2fBbdawHh9l+aeQ
 Z8zl9+Y8N6Bn
X-Google-Smtp-Source: AGHT+IEAJTm5vRoX2bIx9ExajwjVPVYSTgDpUjLDx7EqOiLu/9hIzgQQU+3OG3SSpu4EaF/XKsj+yw==
X-Received: by 2002:a17:902:f687:b0:21d:cd54:c7f0 with SMTP id
 d9443c01a7336-21dd7dccd4fmr320698825ad.33.1738590267941; 
 Mon, 03 Feb 2025 05:44:27 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21de32ebabasm76239415ad.129.2025.02.03.05.44.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 03 Feb 2025 05:44:27 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <877c682axz.fsf@HIDDEN> (muradm's message of "Mon, 03 Feb
 2025 02:17:44 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 <87h65jrlrg.fsf@HIDDEN> <877c682axz.fsf@HIDDEN>
Date: Mon, 03 Feb 2025 22:44:15 +0900
Message-ID: <87tt9bdtxs.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: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> Hi,
>
> Skipped comments are ok or done. Commenting most notable only.
>
> Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:
>
>> You are changing the public API rather drastically.  You need to
>> come up
>> with a mechanism that will warn & automatically rewrite the legacy
>> form
>> to the new form in the meantime, which I'm afraid won't be trivial
>> given
>> the disruptive overhaul.  There are examples among other services;
>> it
>> typically involves defining a man-in-the-middle field sanitizer that
>> takes the old value, updates it to the new expected one while
>> emitting a
>> deprecation warning.
>
> Done. It should be noted that it is impossible to cover all possible
> cases
> to provide solid backward compatibility. Uses of file-like objects
> increase variations.

OK; so the new version will need some fiddling from users to just build
with their current config?  Or are these expected to be rare edge cases?

>> I was wondering why 'greetd-agreety-session' was moved around; it
>> makes
>> your change more confusing to review.  Also, please use double space
>> between sentences, which is conventional in Guix.
>
> Unfortunately, when greetd-service-type first created, it was not
> clear
> for me how to make things clean. Now that cleaning requires somewhat
> complex refactoring.

OK.

[...]

>> Is that new default worth it/better?  It'll create a not so useful
>> empty
>> file in the store.
>
> I didn't introduce that default, but documented it. With v5 default
> fixed.

OK, I must have gotten confused by the messy diff.

>> Looks like all the tables can use '@table @code' instead of @asis,
>> then
>> you can remove all the @code decorators for each items.  This could
>> be
>> done in a prior commit.
>
> I didn't find any use of '@table @code' which document default values.

See (info '(texinfo) @table):

   Write the =E2=80=98@table=E2=80=99 command at the beginning of a line, a=
fter a blank
   line, and follow it on the same line with an argument that is an
   'indicating' command, such as =E2=80=98@code=E2=80=99, =E2=80=98@samp=E2=
=80=99, =E2=80=98@var=E2=80=99, =E2=80=98@option=E2=80=99, or
   =E2=80=98@kbd=E2=80=99 (*note Indicating::).  This command will be appli=
ed to the text
   in the first column.  For example, =E2=80=98@table @code=E2=80=99 will c=
ause the text
   in the first column to be output as if it had been the argument to a
   =E2=80=98@code=E2=80=99 command.

I think the 'indicating' command argument to @table is required, so
there is no default value.

>>> -           (sleep 1) ;give seatd/logind some time to start up
>>
>> That's a suspicious line which already existed.  It looks fragile.
>> Is
>> it really necessary?
>
> Unfortunately, there is no good/easy way to conditionally depend
> on elogind or seatd. greetd-service-type and agreety greeter do not
> require
> seat, only sway based greeters may/will want it.

I meant perhaps waiting 1 second here is no longer necessary?  1 s is
not much at all.  Perhaps added during debug/development of the service
and forgotten?  I'd trying taking it out and see.

--=20
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 23:46:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 18:46:27 2025
Received: from localhost ([127.0.0.1]:36758 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tejfW-0000PK-So
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:46:27 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:53858)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tejfV-0000Oz-5x
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:46:25 -0500
Received: from localhost ([127.0.0.1]:43030)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejf1-000000004nH-3Qfe;
 Sun, 02 Feb 2025 23:45:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=ByJu4jEoFS06TOkJ74E9j4ZYdUpX0QXL7VMye2qDxVQ=; b=cN2wxVNeaXukLLqR417xI2cN1T
 MtiDjnCeiNfFRJL1I+Gnmq/Q25+KJ5bEtxDwp7PmT+Yn/dSYzUEqw2wSMlAyEE6VRBCddHvhRVQ4M
 CvUKaF4a/Q9LAw4gCbd2Aaq6Kzj8jc3upCSmwBFHXYd7qK2JB6JfIUIIAXY7q9gWqi4sQYbviAEKD
 qpxZmz3sb9GOyKpoYXqaaQj2m3sDS10eGCPS86B9BzK8zGt8eIn02jVXJafDCWEPfj2VOGFkqqWIW
 VvopN2iYvd9VORpynNdHC3cIrA85+J5evTMo1gPm7BrUlzVKhsJMostbsG0dDeShtUJ3AYiT7XGs1
 0elfEMx5yO5u96Qw4vhdn41l2Gk55Z8Vrto7kvseNqSLBtBOn7xfBSXZfbzJSRFJB8p82LVZsV8Rz
 uRzozDm4V01jsTQ/8BWEypjnLbXquDtIVsp0SiuT05M5CZXKgqoqYyvif4adfujCPOrakihaKgnv/
 ffM/IJPLiMSNhhN7RgpwU00S;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejfO-00000000148-3ksy;
 Mon, 03 Feb 2025 02:46:18 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 3/3] services: greetd: Add new gtkgreet
 greeter.
In-Reply-To: <87cyg7rkye.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 29
 Jan 2025 00:56:25 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d73bad8de54e28427fc4edb663b610c8a7d159cc.1737900736.git.mail@HIDDEN>
 <87cyg7rkye.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Mon, 03 Feb 2025 02:46:18 +0300
Message-ID: <87v7tr29md.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

>> +(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
>> +                       (session 
>> <greetd-gtkgreet-sway-session>)
>> +                       system target)
>> +  (match-record session <greetd-gtkgreet-sway-session>
>> +    (sway)
>> +    (lower-object
>> +     (make-greetd-sway-greeter-command
>> +      sway
>> +      (make-greetd-gtkgreet-sway-session-sway-config 
>> session)))))
>> +
>
> I wonder if we could use define-configuration and avoid the 
> lower-level
> define-gexp-compiler glue code.

gnu/services/base.scm do not import `(gnu services 
configuration)`.  IMHO,
`define-configuration` is good for serializing record-like 
configuration
to custom formats.  Here we actually need and configure executable
programs.  I was not the one who introduced them, but currently I 
find
them more useful here.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmegA8oACgkQ6M7O0mLO
BeJPzhAAvT9Wt5l3Cyk2K56KFjFhftv8KiX7GujfZrQi8O01GVKgc9WJicPi9X9C
1366GI1rtQyyxobYhWyRBU4cIdsXwoANr//NJcUxFDMLLD2sD4T9q3V4Q6pW5szN
of8HXHYxwLm53yCUSm3RvoTiSp6X7MKCrc9rlXLaTqIwhAd8tbV2KgGzRXSBKnMC
SblmXEfXVV82UBxMRX/HBShhGLZBz+yuPH2eL675/h6Y8hZLCBIX/oqcI1Gb940W
2XKJiiIi2gK5pmgmkRDuiaQtVyh5IAWCIUJTxNLoUE4wfEpabmkAQF0WrgGhxFhz
v8dsDOEE7FJ2GOSy5W+yMw8Y0Ll2HrDTQf2pvGy1HCL364vrGMTvrlew6oAdamd0
5xbKk18fNiX0FULOPkodnjx7dI1VMxtbNaihqzMyv2AKKNEqW041IGJHHtwHkXqb
4oJZDw9XCdwb1zDUQdko5DuhFJy45srNhC7cW8HyI8G425pNEqytLtaqnXKIPLJh
GTzkU9b2sPtclVlFZjUHqLKSbkN1joIYBCpu1FsFjtDk9cXLFqHFDRj6DH+NxBGI
Ueu1lmLe1xUQm1JuOSXzxmt8fnCg3j8Zs6sDASh51/XezJ7nil2O4P+Ru//j98Ta
YyV2+sEEDQCyUWtcn/Ys/lwjfUzVEQkSKNH+FI+XKGMYKp0k6WI=
=qfUG
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 23:40:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 18:40:34 2025
Received: from localhost ([127.0.0.1]:36742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tejZp-00007f-LB
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:40:33 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:46244)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tejZm-00007J-P4
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:40:31 -0500
Received: from localhost ([127.0.0.1]:44330)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejZI-000000004my-3k5s;
 Sun, 02 Feb 2025 23:40:01 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=QE1lWVn+hRckprBU4xsC4uT6daY5+A96V0FpOZRWP6k=; b=viZjxOQw4zE4d7TXIFO5iXfQ+H
 vJMgZbLQu+/oIsJkbPlDuojdkXG8LoFQb75QXzYepd77f/CbVj7xbT73mgbL+j2UuN6iynD6QNLpU
 t6B0MXz91Eo9H7sG4Rs0TTeVlqD4b7bK6Ota92MFOypdQM1b5V+JJwqBumnImDyIaoebbqt7vQcRp
 asHTQFZ7HnB0Cf4xIDSoW+ijruotIkF8+RrdP2BKMZA25PGmmnnk7DF0P9LkKiO6Yhw579GU0nMvd
 OSy8+FlHICfobOtb28krfWkYtdfLaMkTRiaWhy8N2RdGT6k7oF6HxnwvxlRmHEsa/Xl/yeNpsbU1K
 utFlcx6VYe9b2IAzMuEEN5AyK5hpWxSV02Fop9zwHZ7Gla/UDww7Ew4KuEXlqG5MLiAiDO5eqUeYP
 QCbKRVvmF3WXShToRVDXXKgOmJ/71q4EP+5UYk7VMCz45jko5VbT/MmkzkIcaN7zfvm9QQxJeY/5I
 FqfyrbOMEJIpnonkEU8vfyZC;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejZf-000000000r8-01Ff;
 Mon, 03 Feb 2025 02:40:23 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 2/3] gnu: Add gtkgreet.
In-Reply-To: <87ikpyqlsl.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 29
 Jan 2025 13:35:54 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
 <87msfbrq03.fsf@HIDDEN> <87cyg6rcdb.fsf@HIDDEN>
 <87ikpyqlsl.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Mon, 03 Feb 2025 02:40:22 +0300
Message-ID: <871pwf3ogp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>, ludo@HIDDEN,
 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

>>> Hm, that rebuilds gtkgreet just to change its theme?  Couldn't 
>>> its
>>> service be configurable and take care of that instead?
>>
>> There is nothing usable to extract into configuration. I found 
>> it
>> easier to configure package than to have alternative package 
>> inlined
>> into configuration. For instance 
>> `<greetd-gtkgreet-sway-session>` has
>> two fields holding packages `sway` and `gtkgreet`. Is there any 
>> way to
>> specify value of `gtkgreet` to hold multiple packages to 
>> achieve
>> similar effect wihout building package?
>
> If the configuration record allowed provided a 'assets' or 
> field, to put
> in the environment greetd/gtkgreet runs, coupled with a
> 'environment-variables' field, the user could add the 
> gnome-themes-extra
> package to the 'assets' field and pass "GTK_THEME=Adwaita:dark" 
> as an
> environment variable to be set in the environment.

I find it too complex to configure explicitly. Also greeter is 
somewhat
special program, for security, that should be run alone. Messing 
with
its environment, is not good idea.

> Your greetd-user-session already comes with 'extra-env', which 
> could
> accept the above.  It'd just need a new 'assets' field.  The
> lightdm-gtk-greeter-configuration can be used for inspiration. 
> The
> 'gdm-configuration' record also has a 'gnome-shell-assets' field 
> serving
> a similar purpose.

That `extra-env` is not intended for greeter environment, but for
user environment after login.

For now I dropped dark variant.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmegAmYACgkQ6M7O0mLO
BeJxtRAAgYX+a5bXK4SbxjTRfA/Z92X2TFY0ygawTSa0WQ45crfprgxc3MxyBnZU
8il7BZN0gHhIz6ZjHt2FF9jXMGE3GwL6DElQQxZ7v9DvQC2eGk8Xb7r3TqHxJXPv
eQm7nLDchza0GbwMKMbpiLs0FElYjGvsEhRyCNGSK9KSF3rZ+1VUyyxEv2LlmNiz
FNvs3lGupqo9dBtWnAhL+5W8kmBQ+ql4BhCB+98Y9curbr+17QkG+2+Zhupwg6uv
sKX+lyjLCyMoK7rxF3PR2ZZ8jmQygfjYBSg7u1lCVipJlfyz9P9xMmMtIY3C6W73
61mPDAhyoBimDNTYEy+Gth5aYR0HmD29dMmCU0l/DUxHygK62UDYQoIv6zm6+56s
9+TB8cGbv78holRhPNWa8cQ9AyJGgFsjkQKxKumNLhulqqx39x5FhMHqSZN78pf5
BtoW+nK7e2CYge1G1Cwu0Jw6FYzjLNWOsyNAgRdKwGNUX3KeudQEigJq7c5S9PDv
A1Xa0Nm9OwGBcz8xCo3ZxWmmAwUsO22/KJ3KQs2sWB3ZQetcKCB3Hvu1uKQ9sOGj
prJqNYxWusrzoY+f98w/teYZ7aO361aOIgLPgIHZH8uVXR8CSokHFPX+FsLq0Xlw
ZQCBriNLYa+2xmQ8aXw3x69/hY9UkKWDi4/NMpkGwXDQE+Rr/f4=
=HQtM
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 23:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 18:17:54 2025
Received: from localhost ([127.0.0.1]:36678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tejDt-0004Pr-Tj
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:17:54 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55124)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tejDr-0004Pa-Ek
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:17:51 -0500
Received: from localhost ([127.0.0.1]:36394)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejDO-000000004mK-00Tx;
 Sun, 02 Feb 2025 23:17:22 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=24g5LnGxPEc+8lEby88rozYCvTaWTZ7Mt68jsXNIOMU=; b=SGG44EjK8fk0YFQu9lACtdtKTS
 mX8Kl4lTZm8YfsLh6ivKF5kxhRrM2dGtT9ZiacWBNGUlQB+HrKv5ZcfxMUqfGFJnRxyIS1VepzW7T
 vAGIMZ3n9pONiDTxcEBecr8wH6/8N77Ju+qUiefZCg3fP9Qq9FdDQBdtLMk6k/4R9+vGklTk6csIV
 dv7FDtF6edpr0WZg7l7YaxWaxw5yzmArruk74yp8joH8H3zXdSxfrIuBFFxJ/QG7nSnl1CFqxmyjB
 v4CXShjmNEQcNTGFdojU/XmN78wHF6f2pR2dtQHkg39Lt3czYoSQIwMV1mSuUQ67gfdekk9XqVgZ7
 K0gMfyceQ224G3XIBVxx4tashZ1QEkV73VJpOexJmQlBc26XxwMXipZxFu6uUMkHoWXqpfzUZpA52
 6nJ11wNmitL3JwZuZVmObvLnd8bjT2Mj0r2160VZ4mJxgnLNOlvxIEePV/CmNmQe3Umh1/wtLwvKx
 bHO+K4LRPCCHdqUQ4lithOKC;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tejDk-000000008Gq-31Wh;
 Mon, 03 Feb 2025 02:17:44 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87h65jrlrg.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 29
 Jan 2025 00:38:59 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 <87h65jrlrg.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Mon, 03 Feb 2025 02:17:44 +0300
Message-ID: <877c682axz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hi,

Skipped comments are ok or done. Commenting most notable only.

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

> You are changing the public API rather drastically.  You need to 
> come up
> with a mechanism that will warn & automatically rewrite the 
> legacy form
> to the new form in the meantime, which I'm afraid won't be 
> trivial given
> the disruptive overhaul.  There are examples among other 
> services; it
> typically involves defining a man-in-the-middle field sanitizer 
> that
> takes the old value, updates it to the new expected one while 
> emitting a
> deprecation warning.

Done. It should be noted that it is impossible to cover all 
possible cases
to provide solid backward compatibility. Uses of file-like objects
increase variations.

> I was wondering why 'greetd-agreety-session' was moved around; 
> it makes
> your change more confusing to review.  Also, please use double 
> space
> between sentences, which is conventional in Guix.

Unfortunately, when greetd-service-type first created, it was not 
clear
for me how to make things clean. Now that cleaning requires 
somewhat
complex refactoring.

> s/user/users/, s/command/commands/, or 'a stable shell command'. 
> I'm
> not sure what 'stable' means in this context.

Changed stable to POSIX. Idea was to specify something "working 
always".

> I'd reword to: Typically, a <greetd-user-session> record 
> instance is
> used, but file-like objects are also valid.

This one is changed. Having configurable <greetd-user-session>, I 
don't
think that it is worth supporting file-like there.

> I'm not convinced the greetd-wlgreet-color API change is worth 
> the
> trouble (especially given you need to make it 
> backward-compatible with a
> custom record field accessor that checks what it gets and adapts 
> it to
> the new expected format, emitting a deprecation warning in the 
> process).

I was not either. Dropped greetd-wlgreet-color.

> Is that new default worth it/better?  It'll create a not so 
> useful empty
> file in the store.

I didn't introduce that default, but documented it. With v5 
default fixed.

> Looks like all the tables can use '@table @code' instead of 
> @asis, then
> you can remove all the @code decorators for each items.  This 
> could be
> done in a prior commit.

I didn't find any use of '@table @code' which document default 
values.

>> -           (sleep 1) ;give seatd/logind some time to start up
>
> That's a suspicious line which already existed.  It looks 
> fragile.  Is
> it really necessary?

Unfortunately, there is no good/easy way to conditionally depend
on elogind or seatd. greetd-service-type and agreety greeter do 
not require
seat, only sway based greeters may/will want it.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmef/RgACgkQ6M7O0mLO
BeLm9Q//Zo29mv+tPVmbbKMbX5591fcSTfMJcvfY0K6N1v6KrqtXCSWIEnqTS1pB
sFKOgRoP7QvDQ1QUtcI76UNs3GdjVkXK3t9YjMtwLKUQPtGCaHLh74W7fU6WW4tO
fv1wwY3uZ5miRJ/BG4G59vCSaxxH2f0zvqqkrvcAZwS2C0W/42ml6ZQkoCVuBNkZ
HOmWwHWv9AgcLK4Z3jWD8tQ2gQwY1BvcbrxYIrdSmL7Vfv+GBbQAk0/4Z1nOAP2C
w6O+96gcNpn5/0YZJgIjZzc0oNSWVeQRMoLPV0oFC2SdbPcK8uSH+9GFrk9MBGir
FfwSogIj0Au3IjhDaVmw8Pas/Q3zlMQ0JTfIb6cqaq7hGxkvPUJzs0t2JMc6gFaz
H0ToMxWVMHv3AG5V6TKGxgr7t+lbj7Sdv9LRxyn2M+ZBTnE2HBu9f0DRrhndUiDI
MjtZQsybRuqQBUfjAP5MolTpODYfx0bE/CVk6n4CFNO87S2lNv3bAHTaCBdgpaX3
s/urJAt+onKTFUUAuTXBapBXbRcVQoSBTQApRiVJ6H9QjOt0BYzdH//IUsF24N1p
Thk9R3hSE/mmOhL7+AjBmUCoLxhJrFi25xPQr+uMNodz8SG0h0qoR+Vmeweof65X
THGsUhN33Y6l5dOdIdzdrVSRokMWoWxNxdNN7Lpn+qCR8K9pGgk=
=ivHv
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 22:55:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 17:55:04 2025
Received: from localhost ([127.0.0.1]:36632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teirn-0003IU-8J
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:55:04 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:59814)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1teirk-0003Ha-JE
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:55:01 -0500
Received: from localhost ([127.0.0.1]:37848)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teirH-000000004ll-1AXv;
 Sun, 02 Feb 2025 22:54:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=T/3ZIY+TleJIkSq/xK598uVxn6gcomm+MOdM1nX+Lwg=; b=FZhMyK3+gj4/SS4BRO4bQAv4e3
 dEBwIy+r/n45rPHeTs38se3xBubqe45f5XZzYU5lz+eGSK4E0LuK6zYwkTLv6S4apVN8aYIi3e2CY
 eBW6yPQo9oZYF8yBsMAYcQVoRtAVbojAY0c1iaG7SR2sHdqykFIcw7odG/Hchw3tl+4/z/ADebAvL
 DLxinROnnzzSa1oLpayEZL3QDB+HghqZLTRaFdjxLBBd/0dYDCXRk5S5D7/VnaWT5+MsRYihgnWX4
 dY/F+HZeoPFXsNFtx+XR5vRzLkhEEyfLS1KLvYIZyjxgVX6akJzDvIU7vG41VjVwLdAeUdfhzHnDr
 faHeWQ1SDMATJkzhxebqXsBZoyVGwLvzf4m6Qz6NoIjF1XNJpBZR4BO3u7LlSSYr5glzMWGZyQkKW
 Zmw/gtCZTjkOwjrMtLfXRHQ+vOgOA3b8jrD4IGbMagum7t84+tJyagnau4LWCSNtJZcEBqAhjBuxt
 EdsL5iRz+ZRISmo72F34GS06;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teire-000000007X9-1R6F;
 Mon, 03 Feb 2025 01:54:54 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v5 3/3] services: greetd: Add new gtkgreet greeter.
Date: Mon,  3 Feb 2025 01:54:53 +0300
Message-ID: <745d6966766cbe382bf9a07a19f5f33329ac17af.1738536455.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: I34a5418c2ea948ac81fcb9b46aedd662863be31b
---
 doc/guix.texi         | 45 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/base.scm | 38 ++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index c60ad4f216b..5ea9b457109 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20594,8 +20594,8 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
-@code{gexp->script} like object to use as greeter.
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
+@code{greetd-gtkgreet-sway-session} or file-like object to use as greeter.
 
 @end table
 @end deftp
@@ -20718,6 +20718,47 @@ Base Services
 @end lisp
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; The graphical greeter requires additional groups membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             (command
+              (greetd-user-session
+               ;; Optionally signal to .bashrc that we want wayland compositor.
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package providing the @command{sway} and @command{swaymsg} commands.
+
+@item @code{sway-configuration} (default: @code{#f})
+Extra file-like configuration for sway to be included before executing
+the greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{gtkgreet} command.
+
+@item @code{gtkgreet-style} (default: @code{#f})
+Extra file-like CSS stylesheet to customize the GTK look.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{gtkgreet} on successful login, an
+instance of @code{greetd-user-session}.
+
+@end table
+@end deftp
+
 @node Scheduled Job Execution
 @subsection Scheduled Job Execution
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 926fc973c8b..691270f6bec 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -279,6 +279,7 @@ (define-module (gnu services base)
             greetd-wlgreet-session  ; deprecated
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
+            greetd-gtkgreet-sway-session
 
             %base-services))
 
@@ -3708,6 +3709,43 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
         sway
         (make-greetd-wlgreet-sway-session-sway-config s))))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-gtkgreet-sway-session-sway-configuration
+                      (default #f))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style (default #f))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session>
+        sway sway-config gtkgreet gtkgreet-style command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        (if sway-config "include " "")
+        (if sway-config sway-config "")
+        (if sway-config "\n" "")
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l"
+        (if gtkgreet-style " -s " "")
+        (if gtkgreet-style gtkgreet-style "")
+        " -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 22:54:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 17:54:54 2025
Received: from localhost ([127.0.0.1]:36624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teird-0003HR-K1
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:54:54 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:60850)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1teira-0003HB-Bd
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:54:51 -0500
Received: from localhost ([127.0.0.1]:33396)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teir7-000000004lh-0GNM;
 Sun, 02 Feb 2025 22:54:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=tVhFslchya70RdFKvKJwIkQCL/6020uvqk2QttCEvBs=; b=EjNT3TR3NLzUywzRtdgyhvafIy
 efCOEiu6+fGgWQRQNLelKcd0ONsOzhW9bZm/ch+mk8Bp3OGWrwI30QUNwtB2mZnKLSKAI2VOpew/z
 bK4R5fgE4gIDP6NJ6vPbyCzSVZy8yob08S4QQqs5JIw2bI9pjgoWrAdh+J8eHPbRD+WsBHNinOpq0
 EpwoyY2vTj8P+zjaYzaUDWow9uUnGpO5/gdpZQV87Os5ArF2cCWOM9BhlO1rKS6TmoIeX67tdI32A
 IBGdVTQ1RCw3QN6YpZYu3r3iafdlHc4NRJS4w0K9GgXh/mTO2+gAYrTVUOW7+n4Qld3mzJNvau6fj
 MX3uFylO6p1ZX/hm4/ofli4QJDlfgzmBXmfUpQ3VXPAJc/Q0PfP7pHa+qXDc0WwIBQUHNoLduu/mE
 D/mCGJWJmfAn1MLOC3Z69aoNfTrh0ZcX/83eUsNvOM6/0kRc2CYQmObqX5XaF8WZS6vzPTvJ8GBhd
 /WKMVCCakff7/d7hPEbp9QUJ;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teirU-000000007WI-0VMP;
 Mon, 03 Feb 2025 01:54:44 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v5 2/3] gnu: Add gtkgreet.
Date: Mon,  3 Feb 2025 01:54:42 +0300
Message-ID: <1048b16231229ca5aae519ebdaabac722ff47c14.1738536455.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.

Change-Id: If9f90e46d6cad85fa27bf844bbac36c04049d704
---
 gnu/packages/admin.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 8e9dea4e2d9..727d08d262e 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2025 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -6052,6 +6052,29 @@ (define-public wlgreet
 on a GUI toolkit.")
     (license license:gpl3)))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK-based greeter for greetd")
+    (description
+     "GTK-based greeter for greetd, to be run under a compositor such as Cage.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 22:54:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 17:54:35 2025
Received: from localhost ([127.0.0.1]:36620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teirJ-0003Gn-I5
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:54:35 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:58852)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1teirF-0003GW-TY
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:54:31 -0500
Received: from localhost ([127.0.0.1]:42508)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teiqm-000000004ld-20ip;
 Sun, 02 Feb 2025 22:54:00 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=fa0ZYxVXUd5KPc8E3zJabOBvmEeM9e4reGXitHqgdCI=; b=NERVaO8R3fJdc4e6g7BYuUsnES
 j4fmEFPgW2wvx6gQNjg1iF+lsAShOEBBmZ7SF3muAwox8AD5UeGupZDi5EjWt/XO13RwqCDBLwGGq
 HtmphXBvREeO6z9O7vmN8SgRLR0wFObkJU2S/G2wzeJumRFZWX6NZUu2tCvvALeccPLL0Yx2KCcYU
 lGZs8i91i0xxLregGaDxfWmBY8j1q4/4qWZKbOTL4AxqJDShIfdJJcekYXkNXsHthgr/pTCsIN8We
 w5w831PDyeRaAuDZo95DeXLEyojjAHCas3a8B0G67x/wABkxz/I5BNPfyZl6qT5nS+RB9iCdq/oLd
 stLnBTI8K8uNfBzmb+5slitm1QCdvWlTR3oPkyXN3lEDn3T5ahWy2u7XEPW/SRFE4llMsQAFI7KwZ
 BcnArDz++qF+DoIoE0p5EZY7LZI0/C971ZvnB8ce0jKhpEZ7OEUtLm8WoB3M4IGLHibHHxChkJgri
 8Y7KDOTzRgAIwvr4+2A656Zl;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teir9-000000007VN-1VFx;
 Mon, 03 Feb 2025 01:54:23 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v5 1/3] services: greetd: Improve greeter configurations.
Date: Mon,  3 Feb 2025 01:54:21 +0300
Message-ID: <81ca14e1ce416e71e56593e5dcb75fc50699eaca.1738536455.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into `<greetd-user-session>`, which can be reused
as is with different greeters. By default it uses `bash` as
first user process. Then user normally starts additional programs
with `.profile` or `.bashrc`. Using `command`, `command-args` and
`extra-env` one can specify something else, which could be
`dbus-session` wrapped process, some desktop environment or else.
While the above is possible, one is still encouraged to use
`.bashrc`, `.profile` or similar.

It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
`wlgreet` requires a compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: Ibfd79e71a97b0d7fb4a866138d501236b9646ca4
---
 doc/guix.texi         |  77 +++++---
 gnu/services/base.scm | 430 +++++++++++++++++++++++++++++-------------
 gnu/tests/desktop.scm |  14 +-
 3 files changed, 360 insertions(+), 161 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bb5f29277fb..c60ad4f216b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20512,13 +20512,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '("-l"))
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20586,21 +20594,23 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command.  Greeters require user
+command to be specified in some or another way.  @code{greetd-user-session}
+provides a common command for that.  Users should prefer POSIX shell commands
+like @command{bash}, which can start an actual user terminal shell, window
+manager or desktop environment with its own mechanism, which would
+be @file{~/.bashrc} in case of @command{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
-Command to be started by @command{/bin/agreety} on successful login.
+Command to be started by @command{agreety} on successful login.
 
 @item @code{command-args} (default: @code{'("-l")})
 Command arguments to pass to command.
@@ -20608,27 +20618,36 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}.  The User environment may
+adapt depending on its value (normally by @file{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
-before starting command. One should note that, @code{extra-env} variables
+before starting command.  One should note that, @code{extra-env} variables
 are set right after mentioned variables, so that they can be overridden.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{agreety} on successful login, an
+instance of @code{greetd-user-session}.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
+Generic configuration record for the wlgreet greetd greeter.
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
@@ -20650,9 +20669,6 @@ Base Services
 @item @code{border} (default: @code{'(1 1 1 1)})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
@@ -20665,20 +20681,30 @@ Base Services
 on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
 
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package providing the @command{sway} command.
 
 @item @code{sway-configuration} (default: #f)
 File-like object providing an additional Sway configuration file to be
 prepended to the mandatory part of the configuration.
 
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{wlgreet} command.
+
+@item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented
+by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{wlgreet} on successful login, an
+instance of @code{greetd-user-session}.
+
 @end table
 
 Here is an example of a greetd configuration that uses wlgreet and Sway:
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; The graphical greeter requires additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20687,6 +20713,7 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
+              ;; Optional extra sway configuration.
               (local-file "sway-greetd.conf"))))))))
 @end lisp
 @end deftp
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 7331c030d71..926fc973c8b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-session  ; deprecated
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3393,87 +3395,218 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
+                (command command-args extra-env)
+                (program-file
+                 "greetd-user-session-command"
+                 #~(begin
+                     (use-modules (ice-9 match))
+                     (for-each (match-lambda ((var . val) (setenv var val)))
+                               (quote (#$@extra-env)))
+                     (apply execl #$command #$command (list #$@command-args))))))
+
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+                (command command-args extra-env xdg-session-type)
+                (program-file
+                 "greetd-xdg-user-session-command"
+                 #~(begin
+                     (use-modules (ice-9 match))
+                     (let* ((username (getenv "USER"))
+                            (useruid (passwd:uid (getpwuid username)))
+                            (useruid (number->string useruid)))
+                       (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
+                       (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
+                     (for-each (match-lambda ((var . val) (setenv var val)))
+                               (quote (#$@extra-env)))
+                     (apply execl #$command #$command (list #$@command-args))))))
+
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
 (define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
-    (program-file
-     "agreety-tty-session-command"
-     #~(begin
-         (use-modules (ice-9 match))
-         (for-each (match-lambda ((var . val) (setenv var val)))
-                   (quote (#$@extra-env)))
-         (apply execl #$command #$command (list #$@command-args))))))
-
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
-    (program-file
-     "agreety-tty-xdg-session-command"
-     #~(begin
-         (use-modules (ice-9 match))
-         (let*
-             ((username (getenv "USER"))
-              (useruid (passwd:uid (getpwuid username)))
-              (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
-         (for-each (match-lambda ((var . val) (setenv var val)))
-                   (quote (#$@extra-env)))
-         (apply execl #$command #$command (list #$@command-args))))))
+  greetd-agreety-session make-greetd-agreety-session greetd-agreety-session?
+  (agreety greetd-agreety-session-agreety (default greetd))
+  (command greetd-agreety-session-command
+           (default (greetd-user-session))
+           (sanitize warn-greetd-agreety-session-command-type))
+  (command-args greetd-agreety-command-args
+                (default #nil)
+                (sanitize warn-deprecated-greetd-agreety-command-args))
+  (extra-env greetd-agreety-extra-env
+             (default #nil)
+             (sanitize warn-deprecated-greetd-agreety-extra-env))
+  (xdg-env? greetd-agreety-xdg-env?
+            (default #nil)
+            (sanitize warn-deprecated-greetd-agreety-xdg-env?)))
+
+(define (warn-deprecated-greetd-agreety-command-args value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'command-args #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define (warn-deprecated-greetd-agreety-extra-env value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'extra-env #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define (warn-deprecated-greetd-agreety-xdg-env? value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'xdg-env? #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define-deprecated/alias greetd-agreety greetd-agreety-session-agreety)
+(define-deprecated/alias greetd-agreety-command greetd-agreety-session-command)
+
+(define (warn-greetd-agreety-session-command-type value)
+  (when (not (greetd-user-session? value))
+    (warn-about-deprecation
+     "arbitrary command" #f
+     #:replacement '<greetd-user-seesion>))
+  value)
+
+(define (greetd-agreety-session-to-user-session session default-command)
+  (let ((command (greetd-agreety-session-command session))
+        (command-args (or (greetd-agreety-command-args session)
+                          (greetd-user-session-command-args default-command)))
+        (extra-env (or (greetd-agreety-extra-env session)
+                       (greetd-user-session-extra-env default-command)))
+        (xdg-env? (or (greetd-agreety-xdg-env? session)
+                      (greetd-user-session-xdg-env? default-command))))
+    (greetd-user-session
+     (command command)
+     (command-args command-args)
+     (extra-env extra-env)
+     (xdg-env? xdg-env?))))
 
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let* ((agreety
+          (file-append (greetd-agreety-session-agreety session) "/bin/agreety"))
+         (command
+          (greetd-agreety-session-command session))
+         (command
+          (if (greetd-user-session? command)
+              command
+              (greetd-agreety-session-to-user-session
+               session
+               (greetd-user-session)))))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
+     (program-file
+      "agreety-wrapper"
+      #~(execl #$agreety #$agreety "-c" #$command)))))
 
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     (with-imported-modules '((guix build utils))
+       #~(begin
+           (use-modules (guix build utils))
+
+           (let* ((username (getenv "USER"))
+                  (user (getpwnam username))
+                  (useruid (passwd:uid user))
+                  (usergid (passwd:gid user))
+                  (useruid-s (number->string useruid))
+                  ;; /run/user/<greeter-user-uid> won't exist yet
+                  ;; this will contain WAYLAND_DISPLAY socket file
+                  ;; and log-file below
+                  (user-home-dir "/tmp/.greeter-home")
+                  (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                  (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                  (log-file (string-append (number->string (getpid)) ".log"))
+                  (log-file (string-append user-home-dir "/" log-file)))
+             (for-each (lambda (d)
+                         (mkdir-p d)
+                         (chown d useruid usergid) (chmod d #o700))
+                       (list user-home-dir
+                             user-xdg-runtime-dir
+                             user-xdg-cache-dir))
+             (setenv "HOME" user-home-dir)
+             (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+             (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+             (sleep 1) ;; give time to elogind or seatd
+             (dup2 (open-fdes log-file
+                              (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+             (dup2 1 2)
+             (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config)))))))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background (default '(0 0 0 0.9)))
+  (headline greetd-wlgreet-configuration-headline (default '(1 1 1 1)))
+  (prompt greetd-wlgreet-configuration-prompt (default '(1 1 1 1)))
+  (prompt-error greetd-wlgreet-configuration-prompt-error (default '(1 1 1 1)))
+  (border greetd-wlgreet-configuration-border (default '(1 1 1 1)))
+  (wlgreet greetd-wlgreet
+           (default #nil)
+           (sanitize warn-deprecated-greetd-wlgreet))
   (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
+           (default #nil)
+           (sanitize warn-deprecated-greetd-wlgreet-command))
+  (command-args greetd-wlgreet-command-args
+                (default #nil)
+                (sanitize warn-deprecated-greetd-wlgreet-command-args))
+  (extra-env greetd-wlgreet-extra-env
+             (default #nil)
+             (sanitize warn-deprecated-greetd-wlgreet-extra-env)))
+
+(define-deprecated/alias greetd-wlgreet-session greetd-wlgreet-configuration)
+
+(define (warn-deprecated-greetd-wlgreet value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'wlgreet #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-command value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'command #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-command-args value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'command-args #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (warn-deprecated-greetd-wlgreet-extra-env value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'extra-env #f
+     #:replacement '<greetd-wlgreet-sway-session>))
+  value)
+
+(define (make-greetd-wlgreet-config-color section-name color)
   (match color
     ((red green blue opacity)
      (string-append
@@ -3483,71 +3616,97 @@ (define (make-wlgreet-config-color section-name color)
       "blue = " (number->string blue) "\n"
       "opacity = " (number->string opacity) "\n"))))
 
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (make-greetd-wlgreet-config-color section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default #f))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
+                         (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session)))
+  (wlgreet-session
+   greetd-wlgreet-sway-session-wlgreet-session
+   (default #nil)
+   (sanitize warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session)))
+
+(define (warn-deprecated-greetd-wlgreet-sway-session-wlgreet-session value)
+  (when (not (nil? value))
+    (warn-about-deprecation
+     'wlgreet-session #f
+     #:replacement 'wlgreet-configuration))
+  value)
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session>
+        sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-config command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        (if sway-config "include " "")
+        (if sway-config sway-config "")
+        (if sway-config "\n" "")
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file
+        "; " swaymsg-bin " exit\"\n")))))
+
+(define (greetd-wlgreet-session-to-config session config)
+  (let* ((wlgreet (or (greetd-wlgreet config)
+                      (greetd-wlgreet-sway-session-wlgreet session)))
+         (default-command (greetd-wlgreet-sway-session-command session))
+         (command (or (greetd-wlgreet-command config)
+                      (greetd-user-session-command default-command)))
+         (command-args (or (greetd-wlgreet-command-args config)
+                           (greetd-user-session-command-args default-command)))
+         (extra-env (or (greetd-wlgreet-extra-env config)
+                        (greetd-user-session-extra-env default-command))))
+    (greetd-wlgreet-sway-session
+     (sway (greetd-wlgreet-sway-session-sway session))
+     (sway-configuration (greetd-wlgreet-sway-session-sway-configuration session))
+     (wlgreet wlgreet)
+     (wlgreet-configuration config)
+     (command
+      (greetd-user-session
+       (command command)
+       (command-args command-args)
+       (extra-env extra-env))))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
-    (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+  (let ((s (if (nil? (greetd-wlgreet-sway-session-wlgreet-session session))
+               session
+               (greetd-wlgreet-session-to-config
+                session
+                (greetd-wlgreet-sway-session-wlgreet-session session)))))
+    (match-record s <greetd-wlgreet-sway-session> (sway)
+      (lower-object
+       (make-greetd-sway-greeter-command
+        sway
+        (make-greetd-wlgreet-sway-session-sway-config s))))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
@@ -3625,7 +3784,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3675,6 +3835,9 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3706,6 +3869,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 1c32076ccb2..3f861b253b0 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '("-l"))
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 2 Feb 2025 22:51:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 17:51:46 2025
Received: from localhost ([127.0.0.1]:36614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teiob-0003Bm-Pd
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:51:46 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:38236)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1teioZ-0003BW-NE
 for 75270 <at> debbugs.gnu.org; Sun, 02 Feb 2025 17:51:44 -0500
Received: from localhost ([127.0.0.1]:34592)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teio5-000000004lO-1yKP;
 Sun, 02 Feb 2025 22:51:13 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:
 From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=2SxEpmd1Lh2dlliNou84+m/zWivKg98/WwYcKcqS+kg=; b=H3mCDOCR6UkRZODJaKIZSZkPDk
 ltnmVqKPIgLk69Un4JArt+m6Owm29jmcaKe2YSNYz/q8h07FZH3dcmLf/scEqMDJQCbDVlG6QmPU4
 F0zfn8NPELU4+wLqUc6Jqe22AZPtZcv9iFxeXkBv/w++Wo6EYXgWscItSVxC9BcC+AbTGBmIfLcYB
 pf7gHAQHTxI4o5Ad3LsmI7uoVfZeHQn9yx8/wn+fIf0hEutLjmhB00oZjmVeQVaJedDGksgvn2dL0
 gEcsM6n3Ghe6kMCGOE/Rvrd9ISUaTiGwRv2nehaC0FpW5Zd6sC7VJgQlkjJEJ6G4BJcORZosRbq4i
 1lqDeTaiSFxtY2Y9zCwz+S0kIBdsaq5uTNWsyr0SZlL+bXR8ge7/iY3UBLIyREthswDSzgCBiSGu4
 sTf9QHTZyN/vX6PGUyl3TwiLs/63Ur1O5yTlvpkDHwmVIpqB/VbLDfCWhcJnFqOpwcK2ez2n8q3xk
 lNmthnZSkhHiR1pHDeu2gx2L;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1teioR-000000007Oz-2npp;
 Mon, 03 Feb 2025 01:51:35 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: [PATCH v5 0/3] services: greetd: Improve greeter configurations.
Date: Mon,  3 Feb 2025 01:51:35 +0300
Message-ID: <cover.1738536455.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

Minor improvements and fixes compared to v3.

Improves greeter configuration and adds new gtkgreet greeter.

Fixes: https://issues.guix.gnu.org/64112
Fixes: https://issues.guix.gnu.org/65769
Fixes: https://issues.guix.gnu.org/70605
Obsoletes: https://issues.guix.gnu.org/70318

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 120 ++++++++---
 gnu/packages/admin.scm |  25 ++-
 gnu/services/base.scm  | 466 +++++++++++++++++++++++++++++------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 463 insertions(+), 162 deletions(-)


base-commit: b64d3168af697ceb2a96e7e2c62bcf418b8a586a
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 29 Jan 2025 04:36:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 23:36:16 2025
Received: from localhost ([127.0.0.1]:39576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tczoG-0005XY-CT
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 23:36:16 -0500
Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:48440)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tczoE-0005XE-0g
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 23:36:14 -0500
Received: by mail-pj1-x102d.google.com with SMTP id
 98e67ed59e1d1-2efb17478adso10939920a91.1
 for <75270 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 20:36:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738125368; x=1738730168; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=3dKa3+4hvzMyleEJehzMvywdb42JrD75wfSmCJ58Cr4=;
 b=Ic3rMYL41GyUlVYnLA4q25hZaBBLhzNymRVDzr7P2k+eSIQdLgqlCRSO5dRTFIp+Iv
 9Y724BMUlxCN3qF0hyiBeMgILmpjp0/QrHL1uUQLVGt6OzW0R2DcTtQejiQIrBkPyN6o
 +oWcr+Zxk3f/FG044EdgBeCx67TfO0K21uasRcTPl3HbXNffnACX2+fEBT0j/nTDGvea
 RFHClS//C1e/K6V51RBNmDnetDh+7JWtCVIzZzHVfOcgiCk5kNSqQR5AM5qlLga6B/5c
 d55c3BrOr7ZVdonuSkH2WVRbTFGuUxOXBuRO/US7dBH6/kYusWlacquydGyxOGJ0JuOO
 hVJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738125368; x=1738730168;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=3dKa3+4hvzMyleEJehzMvywdb42JrD75wfSmCJ58Cr4=;
 b=YbvZbiJiSNYBnPXrgOJvbCOeWPy3DLIBfUO8VTc/6e1WddOiGAwktJWUOrKFtityib
 hh6xMeRpBFYQsN9VEvS97orSmx//GD9+u4of7X9iuN/E5OLiBU1bd4rnjgzDYUOdXLXm
 xrBklsE3/V4kBhQLMbfZ5oebgwlWkTDl+a/bJMiNdIDutF420HLF7ByTY82uL0SEFjDY
 GjDHecJ5Pm+HmqlOGWN7ATGA4WgALVne5p+6dKsZkbyUG3JpEKRY+kb4Fsi/LuAwq14n
 1dHuC/+TUiJ4baeuSJKJ9Op4ILcILBgo8G8tmNFjtYAWeEZYvgRpkTWlNwVXzPPGQcGG
 p99g==
X-Gm-Message-State: AOJu0YwgH2ZBClc7xmQL+gFERSfho3a+CmQuxt3q7i8ry11SikSYqGAH
 rId/UWXsZQXWMw1N/jRdFWKG8plshGds6AoCUMiK1ShYLsCFsJbe
X-Gm-Gg: ASbGncscyn5Lte/LJ5Rq6UQlFu2m37nmRWnpmL24fqlhooUe9i1NuG+xtM69uami0eU
 x9YsnOrvPO5IaOnY5PdJUK0OmnTIoX+DO8kNs0ZL7HW42Jd+b4F0X6cT0SjSSujO/DwuemKU2LQ
 XbkM2hB5YaaSs9eGSj/gQM5VTilvJElSvyKfhLLJitPlF3AOMC9530hanbpX28JP8wZdVdHNhKV
 1jlRd4lbXn3cHeTe8KuonIafxIMWB+b2MuBm9m7+vkxQReYHBEWhzr1pWfT+eRO8KsmXFr6was+
 /pq15kPTz8v1
X-Google-Smtp-Source: AGHT+IGg35x1WxCBSfXmFX8EFmzRYB6rYZYxtZ5uYn2tRwzRn1T0IAZ52qxWJTQ9abvGxWSU/nQzTg==
X-Received: by 2002:a17:90b:2c85:b0:2ea:77d9:6345 with SMTP id
 98e67ed59e1d1-2f83ac5c20cmr2094910a91.22.1738125367711; 
 Tue, 28 Jan 2025 20:36:07 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-2f83bd09ca3sm483125a91.24.2025.01.28.20.36.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 28 Jan 2025 20:36:07 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 2/3] gnu: Add gtkgreet.
In-Reply-To: <87cyg6rcdb.fsf@HIDDEN> (muradm's message of "Tue, 28 Jan
 2025 22:01:52 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
 <87msfbrq03.fsf@HIDDEN> <87cyg6rcdb.fsf@HIDDEN>
Date: Wed, 29 Jan 2025 13:35:54 +0900
Message-ID: <87ikpyqlsl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>, ludo@HIDDEN,
 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> Hello,
>
> Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:
>
>> Hello,
>>
>> muradm <mail@HIDDEN> writes:
>>
>>> * gnu/packages/admin.scm (gtkgreet): New variable.
>>> (gtkgreet-adwaita-dark): New variable.
>>
>> Please split packages submission in different commits (1 package = 1
>> commit).
>>
>
> It is one package + variation, still split?

Yes.

>>> +    (build-system meson-build-system)
>>> +    (native-inputs (list pkg-config scdoc))
>>> +    (inputs (list gtk+ gtk-layer-shell json-c))
>>> +    (synopsis "GTK based greeter for greetd")
>>> +    (description
>>> +     "GTK based greeter for greetd, to be run under cage or
>>> similar.")
>>
>> I'd spell GTK-based, despite what upstream used.
>
> I copied and pasted what upstream says.

That's why I mentioned 'despite what upstream used' :-) As far as my
English grammar knowledge goes, when you use a compound adjective made
of a modified nound (such as GTK-based), it typically takes a hyphen.
There's apparently no strict rule [0], but in my opinion it helps
reading this correctly (you might pause a bit longer between GTK and
based if it were not joined by a hyphen).

[0]  https://www.merriam-webster.com/grammar/hyphen-rules-open-closed-compound-words

>> What does 'to be run
>> under cage' means?  What is cage?  Shouldn't that run under greetd?
>> I'm
>> confused.  Please expand the description.
>
> While greeter is getting started by greetd, for graphical greeters you
> need some compositor. So that greetd starts compositor which starts
> the greeter. I suppose author here may refer to Cage wayland kiosk
> (guix package --show=cage) compositor as an example. The idea is to
> run greeter in such configuration that only one application is
> executed.

I see!  Maybe it could thus be expound to:

"GTK-based greeter for greetd, to be run under a compositor such as
Cage."

>>> +    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
>>> +    (license license:gpl3+)))
>>> +
>>> +(define-public gtkgreet-adwaita-dark
>>> +  (package
>>> +   (inherit gtkgreet)
>>> +   (name "gtkgreet-adwaita-dark")
>>> +   (arguments
>>> +    (list
>>> +     #:phases
>>> +     #~(modify-phases
>>> +        %standard-phases
>>> +        (add-after 'install 'wrap-gtkgreet-for-theme
>>> +                   (lambda _
>>> +                     (wrap-program
>>> +                      (string-append #$output "/bin/gtkgreet")
>>> +                      '("GTK_THEME" "" = ("Adwaita:dark"))))))))
>>
>> Hm, that rebuilds gtkgreet just to change its theme?  Couldn't its
>> service be configurable and take care of that instead?
>
> There is nothing usable to extract into configuration. I found it
> easier to configure package than to have alternative package inlined
> into configuration. For instance `<greetd-gtkgreet-sway-session>` has
> two fields holding packages `sway` and `gtkgreet`. Is there any way to
> specify value of `gtkgreet` to hold multiple packages to achieve
> similar effect wihout building package?

If the configuration record allowed provided a 'assets' or field, to put
in the environment greetd/gtkgreet runs, coupled with a
'environment-variables' field, the user could add the gnome-themes-extra
package to the 'assets' field and pass "GTK_THEME=Adwaita:dark" as an
environment variable to be set in the environment.

Your greetd-user-session already comes with 'extra-env', which could
accept the above.  It'd just need a new 'assets' field.  The
lightdm-gtk-greeter-configuration can be used for inspiration.  The
'gdm-configuration' record also has a 'gnome-shell-assets' field serving
a similar purpose.

Note that there is a convention to end configuration records wih
'-configuration' in the name.  I believe it will help users see more
clearly through the code if you follow this convention for the proposed
new records.

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 28 Jan 2025 19:02:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 14:02:05 2025
Received: from localhost ([127.0.0.1]:38589 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcqqb-0000cA-8v
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 14:02:05 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:36872)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tcqqY-0000bU-Cn
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 14:02:03 -0500
Received: from localhost ([127.0.0.1]:45098)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tcqqA-00000000869-3kYm;
 Tue, 28 Jan 2025 19:01:38 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Wz0UX98VRzGEzhRuHuEyDhvDCE7DRSDrvNf/06E4yUU=; b=bz+w9+yGB2MIAu+xnzFF+OgPr2
 9pp8ke2HOCQHsuNUafvMnAdyLIrvErEB/OuAgX3ti7U6bG1jYjH4JTzScRrAjMG9502oga8J0+Kk3
 1znJbqBM1TMRt3EzR18ewyoV0tAQ6TnWsqiRTlF29a3Oyr4If/Ss8tdxYIgqSreCiY0ZAGBBnqhJY
 uikXM+aUr6XlkuwhiKdBC8AYaJSZ6UySTLzNEqnHiLZfcHhpw/9UHOtUf0O1RM02o8jMM4zuggqBw
 8EkZ3xGJhyIFHtHONnQxRiDV9wqTRClgP7R9jcMhLGNLMx0kktjgNUCsRd9/4NOg6L6I9A1h5z2Hu
 mKBk1oHVbBt1ZYRlrGhnb3TgKaY+hrRHOAf0MC6JFkgE7yup6pUSmFlIWc4wMI0uR4G8whPwpuI7l
 Vfbd6oJyA2BXTJWD+tyGjQxeZ8Tk/YA3udruJw+2FhL3R67hx6S1mBaIiCDxC9Cj2rMp1vgpoSaEa
 4hBM7A4BKBpN+FpL6pcTJBaC;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tcqqP-000000003Sz-04HX;
 Tue, 28 Jan 2025 22:01:53 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 2/3] gnu: Add gtkgreet.
In-Reply-To: <87msfbrq03.fsf@HIDDEN> (Maxim Cournoyer's message of "Tue, 28
 Jan 2025 23:07:24 +0900")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
 <87msfbrq03.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Tue, 28 Jan 2025 22:01:52 +0300
Message-ID: <87cyg6rcdb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>, ludo@HIDDEN,
 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Hello,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

> Hello,
>
> muradm <mail@HIDDEN> writes:
>
>> * gnu/packages/admin.scm (gtkgreet): New variable.
>> (gtkgreet-adwaita-dark): New variable.
>
> Please split packages submission in different commits (1 package 
> = 1
> commit).
>

It is one package + variation, still split?

>> +    (build-system meson-build-system)
>> +    (native-inputs (list pkg-config scdoc))
>> +    (inputs (list gtk+ gtk-layer-shell json-c))
>> +    (synopsis "GTK based greeter for greetd")
>> +    (description
>> +     "GTK based greeter for greetd, to be run under cage or 
>> similar.")
>
> I'd spell GTK-based, despite what upstream used.

I copied and pasted what upstream says.

> What does 'to be run
> under cage' means?  What is cage?  Shouldn't that run under 
> greetd?  I'm
> confused.  Please expand the description.

While greeter is getting started by greetd, for graphical greeters 
you need some compositor. So that greetd starts compositor which 
starts the greeter. I suppose author here may refer to Cage 
wayland kiosk (guix package --show=cage) compositor as an example. 
The idea is to run greeter in such configuration that only one 
application is executed.

>> +    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
>> +    (license license:gpl3+)))
>> +
>> +(define-public gtkgreet-adwaita-dark
>> +  (package
>> +   (inherit gtkgreet)
>> +   (name "gtkgreet-adwaita-dark")
>> +   (arguments
>> +    (list
>> +     #:phases
>> +     #~(modify-phases
>> +        %standard-phases
>> +        (add-after 'install 'wrap-gtkgreet-for-theme
>> +                   (lambda _
>> +                     (wrap-program
>> +                      (string-append #$output "/bin/gtkgreet")
>> +                      '("GTK_THEME" "" = 
>> ("Adwaita:dark"))))))))
>
> Hm, that rebuilds gtkgreet just to change its theme?  Couldn't 
> its
> service be configurable and take care of that instead?

There is nothing usable to extract into configuration. I found it 
easier to configure package than to have alternative package 
inlined into configuration. For instance 
`<greetd-gtkgreet-sway-session>` has two fields holding packages 
`sway` and `gtkgreet`. Is there any way to specify value of 
`gtkgreet` to hold multiple packages to achieve similar effect 
wihout building package?

>> +   (inputs (modify-inputs
>> +            (package-inputs gtkgreet)
>> +            (prepend gnome-themes-extra)))))
>> +
>
> Nitpic: that'd be more conventionally indented as:
>
> --8<---------------cut 
> here---------------start------------->8---
> (inputs
>  (modify-inputs (package-inputs gtkgreet)
>   (prepend gnome-themes-extra)))
> --8<---------------cut 
> here---------------end--------------->8---

Noted.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmeZKaAACgkQ6M7O0mLO
BeJOqw/+MfsFl2KCUJKPmkEj9VdI6NKimQW19wYZ2NJN9tyaWxguHdL1Lv8rE8s2
at0m/tK5gCDAuaUGe3eIweFuj6qKEZAaYPmxGhJcyPcw2PcSDf14BqKvktb1aD4V
DYGmukxpi61kT3Lbf2QXNr79OxoJUzT5ZMKyFRSUF+aSx5HWCvjhBXHerFz1/h+w
TZU35h2CM1TT69VvBO1915OA+OCT7+z3JMcRiuAeWpXWCrB5ee8Yf5BgaQiN2lct
j9wnyn3ttQLdyFLFlhLlB4q2AhLXriJW9RgO4sV7lvf0UQdnZudz8c2AjsNJNvk0
vTAvVdFB2cBV+QMwXfWUkDmfEom9obJI2h8p2fVWQ/atADND7alc8PNj18/xk3tC
3crdPTRwNdzO1LkgOTYTnlTJFPS9WJPTV29U112HWVzOf3bdGjct+2ZTGJtXghtP
eFujk8Kv7BGpjBjd9WCLA1sTl0KBwI3cj8Wk+a0MzmEPpLYcZeyyAivN1M3k4YbM
bkSjlwDYD2HlHzyL7+YiRkwfWhsKhCUe9P+joJ/70s3nrhYTcMHUfBsXepcCqhFL
0PjUlVSehDsdiEQVp3r30RDE/xH6IGAl/LTVx7IpsMq8kZ+YkNFzSG6sXZ9Divyg
5gGEFvSqlsw2C0SbkPLF/fLF+MO+1irJvG88+tOqPafLKDvRD3w=
=Dn2Q
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 28 Jan 2025 15:56:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 10:56:52 2025
Received: from localhost ([127.0.0.1]:38136 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcnxL-0005MF-Ut
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 10:56:52 -0500
Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:49574)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tcnxE-0005LY-3L
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 10:56:44 -0500
Received: by mail-pl1-x62f.google.com with SMTP id
 d9443c01a7336-2166f1e589cso33281975ad.3
 for <75270 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 07:56:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738079798; x=1738684598; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=hxv6pEFxup4lPvkKflfePNIP0ZThNsHYWzmWC9eC7Ao=;
 b=lGJEAhX3TdlFqXt+KeaiQhWLfiMRrsNHpkXFB9dgi4B5uvsyNYdiZkcwqochtRG6Sg
 WfTJmP5f9jDDTEyDD8MQAHNW8Iy0l4JLTP1aG9i1lBy5RSq/mfYs3KmcwHm15nEqN5qS
 pNcsSLqLP5UDfSXy0ipf5y1uGxiuJBJz6PtjsXLVCkOTU1dfs9gHfoNCIoxwfGR+w2sR
 RGFejXwlc58hPyk8opmYm2ioLQwnKfaikw7vp9A0wEGWkj7QvzlBgOcK0aa5lxNKM525
 s3+IrBmT5vtDwsJbZBT/g2c9sEda1G+cFENngNdKJGZYJNFVJLLAziydz1/4r0Ge0syt
 fhGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738079798; x=1738684598;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=hxv6pEFxup4lPvkKflfePNIP0ZThNsHYWzmWC9eC7Ao=;
 b=i4blTu63C1Rs/cYYsfuAvv9RmL15ixlvg/NpCJAS12l/NLsCKGbIYnMeTK1O5NflVF
 MHfB+7HGMTRgkxMmsuyagnu/ut8DB7ys/xMN6ZaKiC464UNoC7M2IBH8d4YqAXRbIaPs
 P0WIzisjz0UgfbGXuWODXjhfUfVTOwF3Gm+11o+PCK9BlBtJQprAswyKwbEodGb5sO8J
 gGlrSERMvkhrfYW+XBEdLcF6wakENy3rTCTMRt/63AlCALH+/nB11UbkXjKdJFlSJ4MC
 9NPKUAX/FcPwv+we2tQukYX4ExVExAg2+UxqaXpL5f7fCmtkgo2SQzHe9e5IMXRkIzzr
 YXxQ==
X-Gm-Message-State: AOJu0YwOCvh48uasEXT1Zp8OpNEzDEAKBudtdv0rTIT2Ie02CZmwv2s7
 TNNu6Ur6B6pe1LWQkauzwH4KzuMJ2TIfT2KHsAQnS0XwdajsjK8I
X-Gm-Gg: ASbGncsurOYOpI5SlAKpHuhkS7e3GFkgnxzqELk0ZMjeFuI9zJVx2xTT6sNvb4+oAGl
 ZWuuRDBIXDhB9/o3vl2/4x7BpvTJv7jcyEdWrN65EY/BNA3EJcNvnyJiZ1+OiKP5JrhhLD6es8H
 K9VZeYKFhHJaQogwztL1eSZ7cZ2VUfyVD0TbXzEt5gSZOK025JUlslojOeQst9HQuMz37W/s5Ld
 5GXHDGZT915a6c/SSvCxuhvSMAVX/ZNWrobqtMb3dAXh8JbYItoqCpOMK3gv5h07OFLONwvnZKK
 kqQZ5HxV7ZLs
X-Google-Smtp-Source: AGHT+IHWICe1ENHR/Qy5Q3t3v5sRePaBRKWunzCtzDMnznWL7/ZO9jKyugBbsSMue8jkFT/4i+zErA==
X-Received: by 2002:a17:902:e546:b0:216:281f:820d with SMTP id
 d9443c01a7336-21c3553b6famr726406695ad.11.1738079797950; 
 Tue, 28 Jan 2025 07:56:37 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21da3d9c626sm82960475ad.15.2025.01.28.07.56.35
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 28 Jan 2025 07:56:37 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 3/3] services: greetd: Add new gtkgreet
 greeter.
In-Reply-To: <d73bad8de54e28427fc4edb663b610c8a7d159cc.1737900736.git.mail@HIDDEN>
 (muradm's message of "Sun, 26 Jan 2025 17:15:09 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d73bad8de54e28427fc4edb663b610c8a7d159cc.1737900736.git.mail@HIDDEN>
Date: Wed, 29 Jan 2025 00:56:25 +0900
Message-ID: <87cyg7rkye.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> * gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
> represents `gtkgreet` greeter session configuration.
> * doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

OK.

> Change-Id: I10395a742fa7dee2c8ee2f92e80fe5c56a2e4fb6
> ---
>  doc/guix.texi         | 48 +++++++++++++++++++++++++++++++++++++++++--
>  gnu/services/base.scm | 33 +++++++++++++++++++++++++++++
>  2 files changed, 79 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index d74a8938a6d..b1a3558e8ff 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -20594,8 +20594,9 @@ Base Services
>  The user to use for running the greeter.
>  
>  @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
> -Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
> -@code{gexp->script} like object to use as greeter.
> +Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
> +@code{greetd-gtkgreet-sway-session} or @code{gexp->script} like object to use
> +as greeter.

I think you mean file-like object here also (which means just a G-Exp
that lowers to a file name IIUC).  Your fill-column value or editor's
equivalent is set wrong (doesn't fold under 80 columns).

>  @end table
>  @end deftp
> @@ -20732,6 +20733,49 @@ Base Services
>  @end lisp
>  @end deftp
>  
> +@deftp {Data Type} greetd-gtkgreet-sway-session
> +Configuration record for the gtkgreet greetd greeter.  Can be used as
> +following:
> +
> +@lisp
> +  (greetd-configuration
> +   ;; Graphical greeter require additional group membership.

Like earlier, missing 'The' article, as well as 's' to require.  groups
should be plural too now that I think about it, since we're registering
more than one.

> +   (greeter-supplementary-groups (list "video" "input" "seat"))
> +   (terminals
> +    (list (greetd-terminal-configuration
> +           (terminal-vt "1")
> +           (terminal-switch #t)
> +           (default-session-command
> +            (greetd-gtkgreet-sway-session
> +             ;; optionally use Adwaita:dark configured version
> +             (gtkgreet gtkgreet-adwaita-dark)

As mentioned in another mail, I think we need to refine how changing a
theme works.  Rebuilding the package just for that is inelegant and
wasteful.

> +             (command
> +              (greetd-user-session
> +               ;; signal to our .bashrc that we want wayland compositor

Please use full sentences for line comments (including proper
punctuation).

> +               (xdg-session-type "wayland")))))))))
> +@end lisp
> +
> +@table @asis
> +@item @code{sway} (default: @code{sway})
> +The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.

I'd write 'The package providing the @command{sway} and @command{swaymsg}
commands'.

> +@item @code{sway-configuration} (default: @code{(plain-file "greetd-gtkgreet-sway-config" "")})
> +Extra configuration for sway to be included before executing greeter.

*the* greeter.

> +
> +@item @code{gtkgreet} (default: @code{gtkgreet})
> +The package with @command{/bin/gtkgreet} command.

The package with the @command{gtkgreet} command.

> +@item @code{gtkgreet-style} (default: @code{(plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")})
> +Extra CSS stylesheet to customize GTK look.

[...] customize *the* GTK look.

> +
> +@item @code{command} (default: @code{(greetd-user-session)})
> +Command to be started by @command{/bin/agreety} on successful login.

@command{agreety}

> +Normally should be a variation of @code{greetd-user-session}, but could
> +be any @code{gexp->script} like object.

Same as in the previous patch reviewed; s/variation/instance of the
@code{<greetd-user-session>} record/

also s/@code{gexp->script} like/file-like/

> +
> +@end table
> +@end deftp
> +
>  @node Scheduled Job Execution
>  @subsection Scheduled Job Execution
>  
> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index c6098af8f4f..1b46bf76a25 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -279,6 +279,7 @@ (define-module (gnu services base)
>              greetd-wlgreet-color
>              greetd-wlgreet-configuration
>              greetd-wlgreet-sway-session
> +            greetd-gtkgreet-sway-session
>  
>              %base-services))
>  
> @@ -3572,6 +3573,38 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
>        sway
>        (make-greetd-wlgreet-sway-session-sway-config session)))))
>  
> +(define-record-type* <greetd-gtkgreet-sway-session>
> +  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
> +  greetd-gtkgreet-sway-session?
> +  (sway greetd-gtkgreet-sway-session-sway (default sway))
> +  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
> +                      (default (plain-file "greetd-gtkgreet-sway-config" "")))
> +  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
> +  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style
> +                  (default (plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")))
> +  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
> +
> +(define make-greetd-gtkgreet-sway-session-sway-config
> +  (match-lambda
> +    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet gtkgreet-style command)
> +     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
> +           (swaymsg-bin (file-append sway "/bin/swaymsg")))
> +       (mixed-text-file
> +        "gtkgreet-sway-config"
> +        "include " sway-config "\n"
> +        "xwayland disable\n"
> +        "exec \"" gtkgreet-bin " -l -s " gtkgreet-style " -c " command "; " swaymsg-bin " exit\"\n")))))

Please break all these long lines extending past the 80 columns limit.

> +(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
> +                       (session <greetd-gtkgreet-sway-session>)
> +                       system target)
> +  (match-record session <greetd-gtkgreet-sway-session>
> +    (sway)
> +    (lower-object
> +     (make-greetd-sway-greeter-command
> +      sway
> +      (make-greetd-gtkgreet-sway-session-sway-config session)))))
> +

I wonder if we could use define-configuration and avoid the lower-level
define-gexp-compiler glue code.

Otherwise, LGTM.

Assuming you address my above comments,

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 28 Jan 2025 15:39:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 10:39:23 2025
Received: from localhost ([127.0.0.1]:38075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcngQ-0001TQ-Gp
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 10:39:23 -0500
Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:56546)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tcngM-0001T8-Q0
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 10:39:20 -0500
Received: by mail-pl1-x62b.google.com with SMTP id
 d9443c01a7336-2163b0c09afso106169345ad.0
 for <75270 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 07:39:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738078752; x=1738683552; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=rn8fbQlCBzJwecbNAfRD7hBrma/u2KsjGhZ33ZhQ5O4=;
 b=bfpVdzFJ0z+1tjpCUGJsqdaYEGyBqqrFAPmdpI6LbBH7CZo7VLxwQG12zKQUoTrjQv
 8kyRlaQsurqpzYuyK4TqAdQ7hxYDGINi7Mf+8zqTjUsdjnxEjvUb7z+VbMXZgzMiif5K
 0ActG2O3gdIFk/ayhKR62ujTrM3uFfCBhLwIdBNerKy5yK+L5PVGTkyIxiUmmf6j3XFz
 j9/iMGRs3S7WYuCGwfuJW7FNxgXF9hbur6AOu1qZHsjEBPHNLIf8sjH9mzYgIItuZf55
 dqAGC6PBQlFoR2eh7Sm6V0pcrhklYlUK2+gI+0f7GZOWGaGoIWKhRqbU+u4u1r3T2J9J
 ALaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738078752; x=1738683552;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=rn8fbQlCBzJwecbNAfRD7hBrma/u2KsjGhZ33ZhQ5O4=;
 b=MUGA/DXey+9xyp1KauBfbRHC8q9eiZVVMp9B7PqJ8qauA/GsZl5CADS8a2dNnef6XH
 oW1dnV0x4UWWy+bcXYo8dQ4bg/GUI+JcPAoplQIL9S40uAUMsTx/7IDqmQ/EZGgArloN
 zyieaiJrROFopnsZylqIotYb7WR2M7XdESi3w4RImF3jdW2lgybFUh/Q3K5dLgr1wCKN
 UzOLiSZCULLrrJ2Q0rMvjlAdR/LvqVO2giyyQwj0rHN3y/1vIVqqLJy3GlOs4i6JUVjS
 fOPZHUFz/HFSon4SQqtxe3JpZCDZm8+G3+Rya6tAw1+MtMS9ZS/WtkjGaZYxDmFJYN4z
 leYQ==
X-Gm-Message-State: AOJu0YzFRJI/CZmiXlPDB7DCe4N3iXUiQfeOfifqxjh83iWL4dzhogk3
 X7ORPt2rEiqApBTtRyY+4A+86kxsfx9ySa83AoQQQGQW0+fYPLjz
X-Gm-Gg: ASbGnct/JXr/CuYOCTP6cbHK3BfP17osoH/NWboaAWwbehfl+MXFXomhkeJXeuFRnn5
 WuhFm1i8QfCMz7QORPm+8wEtsZF6PRVjp+xxVoBlwkTSVg1FNX9+hACcRdyhcRIsNm6/12Is8aE
 YpNmR4J8EsMy8i3sSS4qqJp8LTjRlQYbpmird5hm1e/o1R7L8quMa8/fKgRuYNOb+Q8ATJYlMoW
 lY1nwfBtMYfD34tQKOjIoW7no98ZzFHV4jpCiKNIRLBpb74qCHeGlOfcfllCM+g95WnCejM4SzM
 02jgnvVAe4ej
X-Google-Smtp-Source: AGHT+IFqGodQzkUy097haq6xf+WMHk2gmW82/bs0mQzzJIBHa5ST7z1j5iykLG6dEA/ElGuQ5qn84A==
X-Received: by 2002:a17:902:ec81:b0:216:26f1:530b with SMTP id
 d9443c01a7336-21c35613e4amr634043525ad.51.1738078752194; 
 Tue, 28 Jan 2025 07:39:12 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21da413f28csm83536925ad.136.2025.01.28.07.39.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 28 Jan 2025 07:39:11 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
 (muradm's message of "Sun, 26 Jan 2025 17:14:46 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
Date: Wed, 29 Jan 2025 00:38:59 +0900
Message-ID: <87h65jrlrg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: ludo@HIDDEN, 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> This improvement focuses on providing common user session scripts
> for use by multiple greeters. Now user session entry point is
> factored out into `<greetd-user-session>`, which can be reused
> as is with different greeters. By default it uses `bash` as
> first user process. Then user normally starts additional programs
> with `.profile` or `.bashrc`. Using `command`, `command-args` and
> `extra-env` one can specify something else, which could be
> `dbus-session` wrapped process, some desktop environment or else.
> While its above is possible, one is still encouraged to use

While *the* above

> `.bashrc`, `.profile` or similar.
> It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
> `wlgreet` requires compositor to run. We provide common sway based

requires *a* compositor

> greeter script, which can be shared by other graphical greeters.
>
> * gnu/services/base.scm (<greetd-user-session>): Common user session
> factored-out, for shared use by multiple greeters.

factored out (no hyphen)

> (<greetd-agreety-session>): Switch to common user session.
> (<greetd-wlgreet-color>): New record, `wlgreet` color holder.
> (<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration
> (<greetd-wlgreet-sway-session>): Switch to common user session.
> * gnu/tests/desktop.scm (%minimal-services): Reflect configuration
> changes.
> * doc/guix.texi (Base Services): Document refactoring changes.
>
> Change-Id: I7d79f07e9aaac21673a7c84ee0f989a474d4749d
> ---
>  doc/guix.texi         | 115 +++++++++++------
>  gnu/services/base.scm | 278 +++++++++++++++++++++++-------------------
>  gnu/tests/desktop.scm |  14 ++-
>  3 files changed, 242 insertions(+), 165 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 9a53bdcd374..d74a8938a6d 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -20512,13 +20512,21 @@ Base Services
>                   (terminal-vt "2")
>                   (default-session-command
>                     (greetd-agreety-session
> -                    (extra-env '(("MY_VAR" . "1")))
> -                    (xdg-env? #f))))
> +                    (command
> +                     (greetd-user-session
> +                      (extra-env '(("MY_VAR" . "1")))
> +                      (xdg-env? #f))))))
>                  ;; we can use different shell instead of default bash
>                  (greetd-terminal-configuration
>                   (terminal-vt "3")
>                   (default-session-command
> -                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
> +                   (greetd-agreety-session
> +                    (command
> +                     (greetd-user-session
> +                      (command (file-append zsh "/bin/zsh"))
> +                      (command-args '())
> +                      (extra-env '(("MY_VAR" . "1")))
> +                      (xdg-env? #f))))))

You are changing the public API rather drastically.  You need to come up
with a mechanism that will warn & automatically rewrite the legacy form
to the new form in the meantime, which I'm afraid won't be trivial given
the disruptive overhaul.  There are examples among other services; it
typically involves defining a man-in-the-middle field sanitizer that
takes the old value, updates it to the new expected one while emitting a
deprecation warning.

>                  ;; we can use any other executable command as greeter
>                  (greetd-terminal-configuration
>                   (terminal-vt "4")
> @@ -20586,19 +20594,20 @@ Base Services
>  The user to use for running the greeter.
>
>  @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
> -Can be either instance of @code{greetd-agreety-session} configuration or
> +Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
>  @code{gexp->script} like object to use as greeter.
>
>  @end table
>  @end deftp
>
> -@deftp {Data Type} greetd-agreety-session
> -Configuration record for the agreety greetd greeter.
> +@deftp {Data Type} greetd-user-session
> +Configuration record for the user session command. Greeters require user command
> +to be specified in some or another way. @code{greetd-user-session} provides a

I was wondering why 'greetd-agreety-session' was moved around; it makes
your change more confusing to review.  Also, please use double space
between sentences, which is conventional in Guix.

> +common command for that. User should prefer stable shell command like @code{bash},

s/user/users/, s/command/commands/, or 'a stable shell command'.  I'm
not sure what 'stable' means in this context.

> +which can start actual user terminal shell, window manager or desktop environment

*an* actual user terminal shell, [...]

> +with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.

@file{~/.bashrc}  (not @code)

also, "in case of the @command{bash} command."

>
>  @table @asis
> -@item @code{agreety} (default: @code{greetd})
> -The package with @command{/bin/agreety} command.
> -
>  @item @code{command} (default: @code{(file-append bash "/bin/bash")})
>  Command to be started by @command{/bin/agreety} on successful login.
>
> @@ -20608,6 +20617,10 @@ Base Services
>  @item @code{extra-env} (default: @code{'()})
>  Extra environment variables to set on login.
>
> +@item @code{xdg-session-type} (default: @code{"tty"})
> +Specify the value of @code{XDG_SESSION_TYPE}. User environment may

*The* user environment [...]

> +adapt depending on its value (normaly by @code{.bashrc} or similar).

s/normaly/normally/

also, @file{~/.bashrc} to be consistent with above

> +
>  @item @code{xdg-env?} (default: @code{#t})
>  If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
>  before starting command. One should note that, @code{extra-env} variables
> @@ -20616,60 +20629,86 @@ Base Services
>  @end table
>  @end deftp
>
> -@deftp {Data Type} greetd-wlgreet-session
> -Generic configuration record for the wlgreet greetd greeter.
> +@deftp {Data Type} greetd-agreety-session
> +Configuration record for the agreety greetd greeter.
>
>  @table @asis
>
> -@item @code{wlgreet} (default: @code{wlgreet})
> -The package with the @command{/bin/wlgreet} command.
> +@item @code{agreety} (default: @code{greetd})
> +The package with @command{/bin/agreety} command.

Note that @command is not intended for path, but for command *names*,
so, ideally we'd mention simply @command{agreety} command, though I see
this is a mistake from the past so could be done in prior commit.
>
> -@item @code{command} (default: @code{(file-append sway "/bin/sway")})
> -Command to be started by @command{/bin/wlgreet} on successful login.
> +@item @code{command} (default: @code{(greetd-user-session)})
> +Command to be started by @command{/bin/agreety} on successful login.

@command{agreety}

> +Normally should be a variation of @code{greetd-user-session}, but could

I'd reword to: Typically, a <greetd-user-session> record instance is
used, but file-like objects are also valid.
>
> -@item @code{command-args} (default: @code{'()})
> -Command arguments to pass to command.
> +@end table
> +@end deftp
> +
> +@deftp {Data Type} greetd-wlgreet-color
> +
> +@table @asis
> +@item @code{red}
> +Value of red.
> +
> +@item @code{green}
> +Value of green.
> +
> +@item @code{blue}
> +Value of blue.
> +
> +@item @code{opacity}
> +Value of opacity.

The descriptions are not too helpful.  Are these supposed to be given as
hex value?  Something else?  A string?  A number?  Please expound.

> +@end table
> +@end deftp
> +
> +@deftp {Data Type} greetd-wlgreet-configuration
>
> +@table @asis

@table @code (and simplify below).

>  @item @code{output-mode} (default: @code{"all"})
>  Option to use for @code{outputMode} in the TOML configuration file.
>
>  @item @code{scale} (default: @code{1})
>  Option to use for @code{scale} in the TOML configuration file.
>
> -@item @code{background} (default: @code{'(0 0 0 0.9)})
> +@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})

You can break these overly long lines via '@' to escape the newline, I
think.

>  RGBA list to use as the background colour of the login prompt.
>
> -@item @code{headline} (default: @code{'(1 1 1 1)})
> +@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
>  RGBA list to use as the headline colour of the UI popup.
>
> -@item @code{prompt} (default: @code{'(1 1 1 1)})
> +@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
>  RGBA list to use as the prompt colour of the UI popup.
>
> -@item @code{prompt-error} (default: @code{'(1 1 1 1)})
> +@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
>  RGBA list to use as the error colour of the UI popup.
>
> -@item @code{border} (default: @code{'(1 1 1 1)})
> +@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
>  RGBA list to use as the border colour of the UI popup.

I'm not convinced the greetd-wlgreet-color API change is worth the
trouble (especially given you need to make it backward-compatible with a
custom record field accessor that checks what it gets and adapts it to
the new expected format, emitting a deprecation warning in the process).

> -@item @code{extra-env} (default: @code{'()})
> -Extra environment variables to set on login.
> -
>  @end table
>  @end deftp
>
>  @deftp {Data Type} greetd-wlgreet-sway-session
> -Sway-specific configuration record for the wlgreet greetd greeter.
> +Configuration record for the in sway wlgreet greetd greeter.
>
>  @table @asis
> -@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
> -A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
> -on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
> -
>  @item @code{sway} (default: @code{sway})
> -The package providing the @command{/bin/sway} command.
> +The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
>
> -@item @code{sway-configuration} (default: #f)
> -File-like object providing an additional Sway configuration file to be
> -prepended to the mandatory part of the configuration.
> +@item @code{sway-configuration} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
> +Extra configuration for sway to be included before executing greeter.

Is that new default worth it/better?  It'll create a not so useful empty
file in the store.

> +@item @code{wlgreet} (default: @code{wlgreet})
> +The package with the @command{/bin/wlgreet} command.
> +
> +@item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
> +Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
> +
> +@item @code{command} (default: @code{(greetd-user-session)})
> +Command to be started by @command{/bin/agreety} on successful login.
> +Normally should be a variation of @code{greetd-user-session}, but could
> +be any @code{gexp->script} like object.
>
>  @end table

Looks like all the tables can use '@table @code' instead of @asis, then
you can remove all the @code decorators for each items.  This could be
done in a prior commit.

> @@ -20677,8 +20716,7 @@ Base Services
>
>  @lisp
>    (greetd-configuration
> -   ;; We need to give the greeter user these permissions, otherwise
> -   ;; Sway will crash on launch.
> +   ;; Graphical greeter require additional group membership.

"*The* graphical greeter requireS additional group membership."

>     (greeter-supplementary-groups (list "video" "input" "seat"))
>     (terminals
>      (list (greetd-terminal-configuration
> @@ -20687,7 +20725,10 @@ Base Services
>             (default-session-command
>              (greetd-wlgreet-sway-session
>               (sway-configuration
> -              (local-file "sway-greetd.conf"))))))))
> +              (local-file "sway-greetd.conf")) ;; optional extra sway configuration

This line is a bit too long (80 columns max).  Pleasae place the comment
on the line above, and punctuate it correctly as a line comment (note
also that margin comments are conventionally written like: ';no space
after semicolon', e.g. one ';' and no space between it and the comment).

[...]

>  (define-record-type* <greetd-wlgreet-sway-session>
>    greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
>    greetd-wlgreet-sway-session?
> -  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
> -                   (default (greetd-wlgreet-session)))
> -  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
> -  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
> -                      (default (plain-file "wlgreet-sway-config" ""))))
> -
> -(define (make-wlgreet-sway-configuration-file session)
> -  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
> -         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
> -         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
> -         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
> -         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
> -                               "/bin/swaymsg")))
> -    (mixed-text-file "wlgreet-sway.conf"
> -      "include " sway-config "\n"
> -      "xwayland disable\n"
> -      "exec \"" wlgreet " --config " wlgreet-config "; "
> -      swaymsg " exit\"\n")))
> +  (sway greetd-wlgreet-sway-session-sway (default sway))
> +  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
> +                      (default (plain-file "greetd-wlgreet-sway-config" "")))
> +  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
> +  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
> +                         (default (greetd-wlgreet-configuration)))
> +  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
> +
> +(define make-greetd-wlgreet-sway-session-sway-config
> +  (match-lambda
> +    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
> +     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
> +           (wlgreet-config-file
> +            (make-greetd-wlgreet-config command wlgreet-config))
> +           (swaymsg-bin (file-append sway "/bin/swaymsg")))
> +       (mixed-text-file
> +        "wlgreet-sway-config"
> +        "include " sway-config "\n"
> +        "xwayland disable\n"
> +        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))

Please break long lines so they fit in 80 chars.

>
>  (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
>                         (session <greetd-wlgreet-sway-session>)
>                         system target)
> -  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
> -                           "/bin/sway"))
> -        (config (make-wlgreet-sway-configuration-file session)))
> +  (match-record session <greetd-wlgreet-sway-session>
> +    (sway)
>      (lower-object
> -     (program-file "wlgreet-sway-session-command"
> -       #~(let* ((log-file (open-output-file
> -                           (string-append "/tmp/sway-greeter."
> -                                          (number->string (getpid))
> -                                          ".log")))
> -                (username (getenv "USER"))
> -                (useruid (number->string (passwd:uid (getpwuid username)))))
> -           ;; redirect stdout/err to log-file
> -           (dup2 (fileno log-file) 1)
> -           (dup2 1 2)
> -           (sleep 1) ;give seatd/logind some time to start up

That's a suspicious line which already existed.  It looks fragile.  Is
it really necessary?

> -           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
> -           (execl #$sway #$sway "-d" "-c" #$config))))))
> +     (make-greetd-sway-greeter-command
> +      sway
> +      (make-greetd-wlgreet-sway-session-sway-config session)))))
>
>  (define-record-type* <greetd-terminal-configuration>
>    greetd-terminal-configuration make-greetd-terminal-configuration
> @@ -3625,7 +3648,8 @@ (define (greetd-accounts config)
>           (name "greeter")
>           (group "greeter")
>           (supplementary-groups (greetd-greeter-supplementary-groups config))
> -         (system? #t))))
> +         (system? #t)
> +         (create-home-directory? #f))))
>
>  (define (make-greetd-pam-mount-conf-file config)
>    (computed-file
> @@ -3675,6 +3699,9 @@ (define (greetd-pam-service config)
>                               (list optional-pam-mount))))
>             pam))))))
>
> +(define (greetd-run-user-activation config)
> +  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
> +
>  (define (greetd-shepherd-services config)
>    (map
>     (lambda (tc)
> @@ -3706,6 +3733,7 @@ (define greetd-service-type
>      (list
>       (service-extension account-service-type greetd-accounts)
>       (service-extension file-system-service-type (const %greetd-file-systems))
> +     (service-extension activation-service-type greetd-run-user-activation)
>       (service-extension etc-service-type greetd-etc-service)
>       (service-extension pam-root-service-type greetd-pam-service)
>       (service-extension shepherd-root-service-type greetd-shepherd-services)))
> diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
> index 1c32076ccb2..923c71a7f89 100644
> --- a/gnu/tests/desktop.scm
> +++ b/gnu/tests/desktop.scm
> @@ -141,13 +141,21 @@ (define %minimal-services
>                   (terminal-vt "2")
>                   (default-session-command
>                     (greetd-agreety-session
> -                    (extra-env '(("MY_VAR" . "1")))
> -                    (xdg-env? #f))))
> +                    (command
> +                     (greetd-user-session
> +                      (extra-env '(("MY_VAR" . "1")))
> +                      (xdg-env? #f))))))
>                  ;; we can use different shell instead of default bash
>                  (greetd-terminal-configuration
>                   (terminal-vt "3")
>                   (default-session-command
> -                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
> +                   (greetd-agreety-session
> +                    (command
> +                     (greetd-user-session
> +                      (command (file-append zsh "/bin/zsh"))
> +                      (command-args '())
> +                      (extra-env '(("MY_VAR" . "1")))
> +                      (xdg-env? #f))))))
>                  ;; we can use any other executable command as greeter
>                  (greetd-terminal-configuration
>                   (terminal-vt "4")

I lost focus a bit in this file given the large hunks of changes, but it
looks reasonable.  The main problem I see is the breakage of the old API
in the current form.  I've given hints at how this can be overcome.
Could you attempt to do so in a v5?

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 28 Jan 2025 14:07:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 09:07:48 2025
Received: from localhost ([127.0.0.1]:36076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcmFk-0004o9-Vy
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 09:07:48 -0500
Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:44415)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tcmFi-0004nm-Fl
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 09:07:43 -0500
Received: by mail-pl1-x633.google.com with SMTP id
 d9443c01a7336-2164b662090so110527185ad.1
 for <75270 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 06:07:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738073256; x=1738678056; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=SX5CJuSy++slS1fzlI6EX7wxWIh91y8wGgvV+PWwQsA=;
 b=OAsQvjJuwLCmsbuA1Qz5UostzwFpVBw6foCxWj/I/EnQoofowaJ1Dx9mg2TBUmoV6o
 cDltTtotCYmct6cCNxUV/iMK9dfW59YCH8CcmaibuW7wtl0GpGBJ4ClGx5KNHkjEIAsM
 zZSYpluGSzrJYQDBM8gbsYkA4u3HzwUcdJDIf56f/WzODUlsCplR2vX4u6ygjFPg+l6X
 +UyGMJluVjmocHF7WPzFU0TtlvIWB86MQAT57mQcK7l+n7RDNJjYdII8ejINSOl2jnd4
 LFA75US0xfHr082450DKy1bnY8JHQTOHcLjD+EuIvN8yULEXuF3SGrXwlbe7jQAD4Piu
 DkJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738073256; x=1738678056;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=SX5CJuSy++slS1fzlI6EX7wxWIh91y8wGgvV+PWwQsA=;
 b=qrOn0aW5Me3xUKGjxVL+7rCKZB7XWaFzWuA8+nuw8wXe6iIIwMV52JRkyg0eQUiJAI
 JKSB4ikAwMxcqAbTZ1AskE8kgKFFBaqNv4+BHJMYT25jxxJK1wYOr+RSwsazIZx1zxNo
 69kIUuDN8YBll/ELKfn/9Ay9Om4iqvodU4oqs8D4qDkVLEgzZqVlDIsp7tycN6fwp0jf
 7V+uc7PVwXsN70u31UJwibmjxonhkBPHwh6+j/yu3webD+X0GPKPISFX00JwP/Ja0oDC
 kPWZ2+wek3Aj+qaQ5Sf85Hm1yN/yRVquK0XTwYp4eC0/dzF60aG+oWFwv0KWwlzQ8tyM
 NHmQ==
X-Gm-Message-State: AOJu0YzwgXz19v1WMZBTUsnQjHtkL5t16daPKa/ICORNUNDgDRiGQHor
 B56T0z3GZif+obAKU15oz8QD2L73qYNCKz2LJ+nwfI7aU+hVTbZz
X-Gm-Gg: ASbGncuLSchLU2ohClLsL8GmXX/FOaeWoTZleQJ4VSLRBUQguyGCXF1ch0luu4dnEzk
 jtqK5dqDgQkdgikiHBnn804qQYbi2v6XTVXoLOtwFUDKykXEZ2xG70ZkkW/hSf5Sk0tqkG8m6Ny
 cjgdeCsktFKfNXmfr2OW0mBESGjMEgTPMKnJtG5h03iphSy9a2tNZBaXCvF823DvzDfng/tYFm5
 n0vUV158VvvkzUZTpFncVSCX02yLZVzCQtB/h2YFIbVSfUyqizmGcn7Qom+49hVkf69VgWOaLl8
 84BsyyP/ZnLc
X-Google-Smtp-Source: AGHT+IFAOBREknaw1GbreIRwNhMnIT7QW6uqdS7qngkg4mvGMi9Xgv6zj98OzuH1fNt2LozHryfL8A==
X-Received: by 2002:a17:902:ecce:b0:21a:8300:b9ce with SMTP id
 d9443c01a7336-21c355f73eamr673529785ad.49.1738073256385; 
 Tue, 28 Jan 2025 06:07:36 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21da424b8f8sm81106065ad.210.2025.01.28.06.07.34
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 28 Jan 2025 06:07:35 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v4 2/3] gnu: Add gtkgreet.
In-Reply-To: <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
 (muradm's message of "Sun, 26 Jan 2025 17:14:57 +0300")
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
 <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Tue, 28 Jan 2025 23:07:24 +0900
Message-ID: <87msfbrq03.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>, ludo@HIDDEN,
 75270 <at> debbugs.gnu.org, pelzflorian@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.0 (-)

Hello,

muradm <mail@HIDDEN> writes:

> * gnu/packages/admin.scm (gtkgreet): New variable.
> (gtkgreet-adwaita-dark): New variable.

Please split packages submission in different commits (1 package =3D 1
commit).

> Change-Id: I9f84c1011e66ae7c87191488930465685ae44569
> ---
>  gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 659f7bc3bec..be6f00ce86b 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -44,7 +44,7 @@
>  ;;; Copyright =C2=A9 2021 WinterHound <winterhound@HIDDEN>
>  ;;; Copyright =C2=A9 2021 Brice Waegeneire <brice@HIDDEN>
>  ;;; Copyright =C2=A9 2021 Maxime Devos <maximedevos@HIDDEN>
> -;;; Copyright =C2=A9 2021 muradm <mail@HIDDEN>
> +;;; Copyright =C2=A9 2021, 2025 muradm <mail@HIDDEN>
>  ;;; Copyright =C2=A9 2021 pineapples <guixuser6392@HIDDEN>
>  ;;; Copyright =C2=A9 2021 Petr Hodina <phodina@HIDDEN>
>  ;;; Copyright =C2=A9 2021-2025 Artyom V. Poptsov <poptsov.artyom@HIDDEN=
om>
> @@ -5939,6 +5939,47 @@ (define-public wlgreet
>  on a GUI toolkit.")
>      (license license:gpl3)))
>=20=20
> +(define-public gtkgreet
> +  (package
> +    (name "gtkgreet")
> +    (version "0.8")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
> +         (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))=
))
> +    (build-system meson-build-system)
> +    (native-inputs (list pkg-config scdoc))
> +    (inputs (list gtk+ gtk-layer-shell json-c))
> +    (synopsis "GTK based greeter for greetd")
> +    (description
> +     "GTK based greeter for greetd, to be run under cage or similar.")

I'd spell GTK-based, despite what upstream used.   What does 'to be run
under cage' means?  What is cage?  Shouldn't that run under greetd?  I'm
confused.  Please expand the description.

> +    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
> +    (license license:gpl3+)))
> +
> +(define-public gtkgreet-adwaita-dark
> +  (package
> +   (inherit gtkgreet)
> +   (name "gtkgreet-adwaita-dark")
> +   (arguments
> +    (list
> +     #:phases
> +     #~(modify-phases
> +        %standard-phases
> +        (add-after 'install 'wrap-gtkgreet-for-theme
> +                   (lambda _
> +                     (wrap-program
> +                      (string-append #$output "/bin/gtkgreet")
> +                      '("GTK_THEME" "" =3D ("Adwaita:dark"))))))))

Hm, that rebuilds gtkgreet just to change its theme?  Couldn't its
service be configurable and take care of that instead?

> +   (inputs (modify-inputs
> +            (package-inputs gtkgreet)
> +            (prepend gnome-themes-extra)))))
> +

Nitpic: that'd be more conventionally indented as:

--8<---------------cut here---------------start------------->8---
(inputs
 (modify-inputs (package-inputs gtkgreet)
  (prepend gnome-themes-extra)))
--8<---------------cut here---------------end--------------->8---

--=20
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 28 Jan 2025 13:56:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 28 08:56:35 2025
Received: from localhost ([127.0.0.1]:36045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcm4w-0004Ep-PJ
	for submit <at> debbugs.gnu.org; Tue, 28 Jan 2025 08:56:35 -0500
Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:47218)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tcm4t-0004EY-AE
 for 75270 <at> debbugs.gnu.org; Tue, 28 Jan 2025 08:56:32 -0500
Received: by mail-pl1-x62f.google.com with SMTP id
 d9443c01a7336-21680814d42so92208165ad.2
 for <75270 <at> debbugs.gnu.org>; Tue, 28 Jan 2025 05:56:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738072585; x=1738677385; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=A8UuhEzTbO0I2N9oqaPpptTDli+50o4/XyY7uhCZ75k=;
 b=exZXkZ1R5zNBi8RoomWBJkEgYhNoer3TzwHzYa9/rAvOcj/kePSOXg6Q+tmcbFOS3E
 7YcPPmbd37TJjXaOc+L8XEtPqry/WWAT3ch2Iq8LdUWk1UMjhZe2bAVQmGBP+5ibTZT9
 GptwBpO7KQpFmKYaw1CeE5trkxi+WjbuKT5qDnByUR9szruwFO2B2Mo+fvLP89Yestn7
 VR8zuenJ65z33wzEBo1CfEar/EieQ+2PSHgGQwVS0+WIssNA4Hxv+qXQSpdu2ulSapd7
 YMDS1fdp1K1Le+NG+LXwkWXndwivAjvW8JjL+gaxCXKkYLmc51GOyb8H5R5NscCeBKg5
 MlsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738072585; x=1738677385;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=A8UuhEzTbO0I2N9oqaPpptTDli+50o4/XyY7uhCZ75k=;
 b=nLSPtadu71+tgeevbr5OND7JiCIOX0BcdmTGeYKOtA70Eh/EG6L1d0tJZPygXiRAdY
 PjMUXkQxsM2/gEPZvBd4/ojVT+daT1wBdmC9/ipZLTzI8y2ELek3ckofZrT/7W/00lXE
 7t64hbA98s3J9NBPhBG7iiv/EuaGN95Gx8BKzNHKlUFx61m7hlXNoXYNvjEuJg41X7Hh
 cdTWWoxxDLOFWB0uM+9FWIx8EN0SiZ7KHURrJ2Qvm6JHTucpE4o0DWW4k/ny5QaC78nI
 LSqjbGeWXYUcWOw+Xs46yamyEBSvJ17pug4YFoiNcNhyv1S/FRy7aXhlp58ScFEqHbNY
 JJuA==
X-Forwarded-Encrypted: i=1;
 AJvYcCXPNMZcL7wkxAqmQQFI0UJAZOymB7NQEZ3fAI4A1YvODWrtisbNDOexyGo6d7nVNPWS7i7i8g==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwgFsXrXi778xp2JZZ1sFnSzfd3OjPtUoQv/DC/c0R/Vu/lQ+DS
 Kpi0esqbUdO86n5i4UwTTgt1i/mbdvbKVCdbasDMHBAwpiB1CpSf2m29p3zc
X-Gm-Gg: ASbGnctouPLORerrOsRZ+yhi9qdPSmaxwP7JFVuREKUkeHlJn4OSahg3ll12GJO/shv
 ZgBYz4Sqr71zsiqoI1ODcovcSerm3xKC80NdwrX5EtXmXMW8SYd6GluphKCOUYffysqvMUbAsF/
 If1pDlIxjrJrn4jHD05N7zp5JMzkcw0cxIl4kVKfqdqoPS16EaQ5myxQ/CWY6TsFGXFL4OtWc9F
 htA2u/TtSQEek+43lkc45iDb1UcWbHXwSufqZXgeRW+xXXQpRz9f3LBxkKgg8HqzX6TaYafbn4E
 wr+XCB3riPPQ
X-Google-Smtp-Source: AGHT+IEeE1vFYqJ3p6WVPNHhxpVpQxgP3WQXZoQBM4nwg8PjpD059406DoJT76waw8RPOlB1bI7tEQ==
X-Received: by 2002:a17:902:da87:b0:216:501e:e314 with SMTP id
 d9443c01a7336-21c3540d181mr661561945ad.20.1738072584595; 
 Tue, 28 Jan 2025 05:56:24 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21da424e7fasm81329245ad.223.2025.01.28.05.56.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 28 Jan 2025 05:56:24 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH 0/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87msg85dxf.fsf@HIDDEN> (muradm's message of "Fri, 03 Jan
 2025 14:34:20 +0300")
References: <cover.1735771462.git.mail@HIDDEN> <87msg85dxf.fsf@HIDDEN>
Date: Tue, 28 Jan 2025 22:56:12 +0900
Message-ID: <87v7tzrqir.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <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.0 (-)

Hi,

muradm <mail@HIDDEN> writes:

> btw, this will solve 64112, 65769 and 70605.

Could you make this clear in the commit messages by adding git trailers
such as:

--8<---------------cut here---------------start------------->8---
Fixes: https://issues.guix.gnu.org/64112
--8<---------------cut here---------------end--------------->8---

in the commits that resolve the issues?

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 27 Jan 2025 16:28:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 27 11:28:51 2025
Received: from localhost ([127.0.0.1]:34228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcRyl-0001NP-7b
	for submit <at> debbugs.gnu.org; Mon, 27 Jan 2025 11:28:51 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:35210)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tcRyi-0001My-Ka
 for 75270 <at> debbugs.gnu.org; Mon, 27 Jan 2025 11:28:49 -0500
Received: from localhost ([127.0.0.1]:32882)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tcRyM-000000006so-06WL;
 Mon, 27 Jan 2025 16:28:26 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=jQYlbrLsxlHauvw6AKWY+YQGE3pFjDkP8T5uHpiDQCs=; b=UMxM04gQN9Nh+1/4tWhmAWc9Wb
 y2dbTq0WFPvmettdO+zBuMF8CZ+5dQky+PLK0xj7nVUcSsOXwhJBghX3O+0ilnyt+hL0kQZzDyhP6
 uSR6/Pv1NmtzMLM72lTREf4rwsetCfIM8dXxs3DYTx5rwpCLQ4pgLjGXbhKgQ1d1dj/aID+3V9k8h
 Ez2oT8liZ8kxCJepXXtBrjrgX5nbzkPRhbArQyqMJizNk/Ty3hv0FTXJZV6rhwwHW1xOFO566Lt+V
 m3HxmFITFeOtQuHyeZhN02mvqyjBSwgWnE/MY8oAaDkeIulFkX5jHAs6xOY1IF3uXqVdRdMi10kZo
 cwoWJx5VOMitWZmfwKY6p4uI8tem9brdi1UmKC8k0oG8+RsNrjAEnnpI7/Tc0O5fvkI324Wy4o4+u
 Nrolg2Kvm91K1lYVi1pQOW/VCrKXJa3xG627KoK4Gw6ifjc5PUyVZpWmMYryfCTCIYy92wtXPjwLi
 +He959YLyaY+I+DQ+sGHeFDU;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tcRya-000000004hH-0PCz;
 Mon, 27 Jan 2025 19:28:40 +0300
From: muradm <mail@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87sep55bp8.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 27
 Jan 2025 09:42:43 +0900")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 <87y0zjmy2w.fsf@HIDDEN> <87tta5zbjp.fsf@HIDDEN>
 <87a5bfaqvk.fsf@HIDDEN> <875xm1sl3j.fsf@HIDDEN>
 <87sep55bp8.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Mon, 27 Jan 2025 19:28:39 +0300
Message-ID: <87r04oqkzs.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@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.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable


Hi Maxim,

My last resort idea was exactly the same. Issues 75872, 75873,=20
75874 and 75875 was initiated with 'To: 75270 <at> debbugs.gnu.org',=20
but it didn't help either =C2=AF\_(=E3=83=84)_/=C2=AF.

I will close and archive them as well. Without trying again :) I=20
suppose it is enough copies of v4 is attached to 75270.

=2D-
Thanks in advance,
muradm

Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes:

> Hi Muradm,
>
> muradm <mail@HIDDEN> writes:
>
>> Hi,
>>
>> Fixed in v4.
>>
>> P.S. Sorry 75862, 75863, 75864 and 75865 was my bad due to=20
>> missing
>> headers. But 75866, 75867, 75868 and 75869 should not
>> happen. 75270 <at> debbugs.gnu.org was included in CC. WHat do you=20
>> suggest
>> to do with them?
>
> It's not just CC, you need to send 'To: 75270 <at> debbugs.gnu.org',=20
> using
> 'git send-email --to=3D75270 <at> debbugs.gnu.org', or using 'mumi=20
> current
> 75270 && mumi send-email *.patch', for example :-).
>
> It's a bit tricky and we all get it wrong at times, no worries.=20
> I'd
> suggest closing the spurious issues created and resending to the=20
> correct
> already existing issue.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmeXtDcACgkQ6M7O0mLO
BeJ96Q//V2s1V18to3riGaQkRQB8E2VOsbjVxCgTGVgOcg5kfgAFNM+oD9zExmlp
uP92/HKNWWfBYwgEmcmIkpOtVMJvbUjfqS6AN/TpUNV0/zhWap60M6Y0ihcZ0GsQ
HhaOStM1sowNJJSdeGQZQlZztAd+YF2bEUjUKDQkRrZwNGQGwOSH+jrfLJqYqUkd
sEcr5CN0qIfk+zKpMNxiBlH4t2LWHKcxVxT03XREy9S8ISaWsHUp1QVM0yVPNRa5
sBtPT39BvDf80DL7bpLxh83HPMUulCoIrxpRCfM+0T8MdfV4SpojifOSAsc1PFWn
RihQtXEUyVwwgLZR0+/VIg6gUXawWoW83Hb/f5ignl5obmbdCJPksl4uDv6efOjZ
apSsyMwDroYJRBY05B5Gdr3HJ3fySKGCWQj3kpGIeYRHJ1K4VdJ//qgE+Rpw/DkU
IIPiU8S0kGlF53Mt5FMCesuSQZzw9BeXifUllDd6pRMdkyyeSOakWIgRPn/Ec4M3
OYDSynoOW8FJwplnv3urzZHQDoc8xm0nVBJIJD6Ao3oZXvgxgzGMhfaRmCjwHxxi
4ENDw06EE3w4HmUCNjJ3h0zYa7ENyxPN0yRTuRcb3TKqPlwYpGBfeY45Hy6YvPi0
ZQmqehb1xEga9LFutWKpUV0txvUqyWfcKhpOjSEmEsgLXgq8pjQ=
=F4DZ
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 27 Jan 2025 00:43:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 19:43:05 2025
Received: from localhost ([127.0.0.1]:58415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tcDDU-00045p-D5
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 19:43:04 -0500
Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:56535)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tcDDS-00045C-Cq
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 19:43:03 -0500
Received: by mail-pl1-x632.google.com with SMTP id
 d9443c01a7336-2163b0c09afso70113965ad.0
 for <75270 <at> debbugs.gnu.org>; Sun, 26 Jan 2025 16:43:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737938575; x=1738543375; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=53Y/aRIjAzwkb6VbhSeZJxr5JN+/uwfr3NFqyzFKYgk=;
 b=fFc8h2XM/rPROTyh/QwritKHDhYxSWcULE7hbScND66lfyT5AyMdz/11zfjPQWvHlG
 H1tJ1GGMByDWz8lCmV84f2DwJ6RQxL1i0BpCDqb127wvSSL+4ay4XHStm9CowreXjEqo
 pCFftp4UvKsrSPbLicpeeRRRbuYZwGoL8UVyWjiUQtdQALhhCGFH3Zy9PyGy08NMrgFH
 Y8UFs6taiYajZyM0PIqAVK6iqtD8CsQex578QhPWE3YmOFtto0x0W5a855PnOidEc6/n
 +F+P9W3HU4VMWp4SlFFjpGgj/beGSlx7cPUG2c/IBXDtDmScO9G++FAoIKvX5rhTgfcK
 Mmhw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737938575; x=1738543375;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=53Y/aRIjAzwkb6VbhSeZJxr5JN+/uwfr3NFqyzFKYgk=;
 b=xC3j+5xyabp41tjArYOBe9kkjlCuewDgeNoefivNvJ3/rjbfa68MPFUwu+MZoAo8Dr
 2GiKjKG21pY6ziXi58eV4GOH7G284Nt38zQwvljdNaFbyaSoej6v8TsnuiXu+2wRktsG
 guEAI3X7pQ9+mTOkso5P9UcfA0g1KWr8QNbmV87eJbr1L2B7uZy33LNg+2vZ+5h5OKiA
 1GqQXlppJVY4F8JXDmMqwbnJUB5zYVdgYvZzseRPJgBtWNa5lFejLtcKQe969lOyUu7R
 ii+LDoUx7w6JUihuCBc31Z1MsPhDJzly2XpgQXbYTI+mPFlPW045zxC+giCBeW/Aax3K
 ZGSg==
X-Forwarded-Encrypted: i=1;
 AJvYcCW4Htw0Mke0U1yBQsyjkKOEYUbFRBa0nXaghHNFJiYoe5WhThKibilpf2RfFgoU3HQnaesskw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yxz62T8lkJnNOipxECdPkHoY6kBQwQKuFCxeYt4LSS0Ldrl0IaE
 GATIkaswk02ctHTrWWg3AIDHQ3eJ0FqKrwUFydMD8EQiNLVseFXxkbh1LR2M
X-Gm-Gg: ASbGncs6T0AKsvEFiiH9pKTUvWX6iZU5qCJJrjaGq4wnFjejD6q2gl5IaN32ivEPuli
 iinA/HeIYXwaqczxmTVI1Jx3BJTVZ8FKIwnoiMN5JOghv40fGaGR7XX5p3QwtByAkJq6pnLT+XM
 hNIoItgCytjZQVgSqkOw5zxfcI78x3QMB7P+v7IULTPDY713N10pXzX4mJagvIoe0pQAw32p0SY
 wlkMk5lVnEyiGz2z4LGBhAFcdOeTb2JR5iGWYStID3TiXjUGzYn01iWekfg1KWRnIUh/tUMH0fK
 Ow==
X-Google-Smtp-Source: AGHT+IGq+B3gLRNAIbexbo9Ozy30pM6M5SHWJYsWW5482O+WG3Twk+ICeyLb+Vluy4EZCwOc8Dv/yQ==
X-Received: by 2002:a17:902:ce01:b0:211:e812:3948 with SMTP id
 d9443c01a7336-21c34cc010emr637651915ad.0.1737938575548; 
 Sun, 26 Jan 2025 16:42:55 -0800 (PST)
Received: from terra ([2405:6586:be0:0:c8ff:1707:9b9:af89])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-21da414d905sm51181525ad.180.2025.01.26.16.42.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 26 Jan 2025 16:42:54 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <875xm1sl3j.fsf@HIDDEN> (muradm's message of "Sun, 26 Jan
 2025 17:31:12 +0300")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 <87y0zjmy2w.fsf@HIDDEN> <87tta5zbjp.fsf@HIDDEN>
 <87a5bfaqvk.fsf@HIDDEN> <875xm1sl3j.fsf@HIDDEN>
Date: Mon, 27 Jan 2025 09:42:43 +0900
Message-ID: <87sep55bp8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@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.0 (-)

Hi Muradm,

muradm <mail@HIDDEN> writes:

> Hi,
>
> Fixed in v4.
>
> P.S. Sorry 75862, 75863, 75864 and 75865 was my bad due to missing
> headers. But 75866, 75867, 75868 and 75869 should not
> happen. 75270 <at> debbugs.gnu.org was included in CC. WHat do you suggest
> to do with them?

It's not just CC, you need to send 'To: 75270 <at> debbugs.gnu.org', using
'git send-email --to=75270 <at> debbugs.gnu.org', or using 'mumi current
75270 && mumi send-email *.patch', for example :-).

It's a bit tricky and we all get it wrong at times, no worries.  I'd
suggest closing the spurious issues created and resending to the correct
already existing issue.

-- 
Thanks,
Maxim




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

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 15:03:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 10:03:03 2025
Received: from localhost ([127.0.0.1]:57497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc4A8-0005jX-Vt
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:03:02 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55534)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc49u-0005hb-Ma
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:49 -0500
Received: from localhost ([127.0.0.1]:36824)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49a-000000005NG-0BSW;
 Sun, 26 Jan 2025 15:02:26 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=slP/WMdubJbEJXFVAvD4hHHUfoSKszeSep64WBD8peA=; b=EGKyZvxKqc3xON9p6Z+KY6K6M0
 d7fRBzMlmt2hvRuIsNabGDp2XM3mdIXZOz/7n/E2Oqy3AczL5DrhIjuyZY/L2RVO0DcRjn2tirCFL
 Qi9vZ0DBj8H7zjk7YoDe2htQdq8p2SpvqdGdo6WRt08MNCjNMAwqpnulH0F53qUnyrT4RySEYGtPz
 lv8tdgNQjUaZCPEr+LifoTQoLoLGB1w5QJTwFkbjSpLZSpfKYkKM9A+fkWioqaXu5GKiM8vz1pPN/
 61s4f8kele32tN7nxjKTRz3sUNomg68cVC9E/HM30tn6/+p6RpM9dwL3U+x82r906LZlNWHsMtOsE
 tGW62M94nh8M2fcKmmkXIILysfZjXflqDeWVbPasPeCMwvp89i6qC+Y1Gsy4OnOLR3PljXJL55+Wa
 gAZZGEU01rH3bl+SmqJ1T/8LrsX5ODyx2kXYSITZmHUP9rbTSfrRKMejFjUP0YkFRmaFuQVEtw7VA
 U8tLll4hDEIvZjQASucYXuwK;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49o-000000005Jf-1SRi;
 Sun, 26 Jan 2025 18:02:40 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 75270 <at> debbugs.gnu.org
Subject: [PATCH v4 1/3] services: greetd: Improve greeter configurations.
Date: Sun, 26 Jan 2025 18:02:31 +0300
Message-ID: <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737903645.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737903645.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737903645.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into `<greetd-user-session>`, which can be reused
as is with different greeters. By default it uses `bash` as
first user process. Then user normally starts additional programs
with `.profile` or `.bashrc`. Using `command`, `command-args` and
`extra-env` one can specify something else, which could be
`dbus-session` wrapped process, some desktop environment or else.
While its above is possible, one is still encouraged to use
`.bashrc`, `.profile` or similar.

It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
`wlgreet` requires compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored-out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-color>): New record, `wlgreet` color holder.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: I7d79f07e9aaac21673a7c84ee0f989a474d4749d
---
 doc/guix.texi         | 115 +++++++++++------
 gnu/services/base.scm | 278 +++++++++++++++++++++++-------------------
 gnu/tests/desktop.scm |  14 ++-
 3 files changed, 242 insertions(+), 165 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 9a53bdcd374..d74a8938a6d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20512,13 +20512,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20586,19 +20594,20 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command. Greeters require user command
+to be specified in some or another way. @code{greetd-user-session} provides a
+common command for that. User should prefer stable shell command like @code{bash},
+which can start actual user terminal shell, window manager or desktop environment
+with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
 Command to be started by @command{/bin/agreety} on successful login.
 
@@ -20608,6 +20617,10 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}. User environment may
+adapt depending on its value (normaly by @code{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
 before starting command. One should note that, @code{extra-env} variables
@@ -20616,60 +20629,86 @@ Base Services
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{/bin/agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-color
+
+@table @asis
+@item @code{red}
+Value of red.
+
+@item @code{green}
+Value of green.
+
+@item @code{blue}
+Value of blue.
+
+@item @code{opacity}
+Value of opacity.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
 @item @code{scale} (default: @code{1})
 Option to use for @code{scale} in the TOML configuration file.
 
-@item @code{background} (default: @code{'(0 0 0 0.9)})
+@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})
 RGBA list to use as the background colour of the login prompt.
 
-@item @code{headline} (default: @code{'(1 1 1 1)})
+@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the headline colour of the UI popup.
 
-@item @code{prompt} (default: @code{'(1 1 1 1)})
+@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the prompt colour of the UI popup.
 
-@item @code{prompt-error} (default: @code{'(1 1 1 1)})
+@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the error colour of the UI popup.
 
-@item @code{border} (default: @code{'(1 1 1 1)})
+@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
 @deftp {Data Type} greetd-wlgreet-sway-session
-Sway-specific configuration record for the wlgreet greetd greeter.
+Configuration record for the in sway wlgreet greetd greeter.
 
 @table @asis
-@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
-A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
-on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
-
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
 
-@item @code{sway-configuration} (default: #f)
-File-like object providing an additional Sway configuration file to be
-prepended to the mandatory part of the configuration.
+@item @code{sway-configuration} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{/bin/wlgreet} command.
+
+@item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
 @end table
 
@@ -20677,8 +20716,7 @@ Base Services
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; Graphical greeter require additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20687,7 +20725,10 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
-              (local-file "sway-greetd.conf"))))))))
+              (local-file "sway-greetd.conf")) ;; optional extra sway configuration
+             (command
+              (greetd-user-session
+               (xdg-session-type "wayland")))))))))
 @end lisp
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 5967457002d..c6098af8f4f 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-color
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3393,161 +3395,182 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
-(define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session
+  greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
     (command command-args extra-env)
     (program-file
-     "agreety-tty-session-command"
+     "greetd-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+    (command command-args extra-env xdg-session-type)
     (program-file
-     "agreety-tty-xdg-session-command"
+     "greetd-xdg-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (let*
              ((username (getenv "USER"))
               (useruid (passwd:uid (getpwuid username)))
               (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
+           (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
            (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
+(define-record-type* <greetd-agreety-session>
+  greetd-agreety-session make-greetd-agreety-session
+  greetd-agreety-session?
+  (agreety greetd-agreety (default greetd))
+  (command greetd-agreety-command (default (greetd-user-session))))
+
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let ((agreety (file-append (greetd-agreety session) "/bin/agreety"))
+        (command (greetd-agreety-command session)))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
-
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
-  (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
-  (match color
-    ((red green blue opacity)
-     (string-append
-      "[" section-name "]\n"
-      "red = " (number->string red) "\n"
-      "green = " (number->string green) "\n"
-      "blue = " (number->string blue) "\n"
-      "opacity = " (number->string opacity) "\n"))))
-
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+     (program-file "agreety-wrapper" #~(execl #$agreety #$agreety "-c" #$command)))))
+
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     (with-imported-modules '((guix build utils))
+       #~(begin
+           (use-modules (guix build utils))
+
+           (let* ((username (getenv "USER"))
+                  (user (getpwnam username))
+                  (useruid (passwd:uid user))
+                  (usergid (passwd:gid user))
+                  (useruid-s (number->string useruid))
+                  ;; /run/user/<greeter-user-uid> won't exist yet
+                  ;; this will contain WAYLAND_DISPLAY socket file
+                  ;; and log-file below
+                  (user-home-dir "/tmp/.greeter-home")
+                  (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                  (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                  (log-file (string-append (number->string (getpid)) ".log"))
+                  (log-file (string-append user-home-dir "/" log-file)))
+             (for-each (lambda (d) (mkdir-p d) (chown d useruid usergid) (chmod d #o700))
+                       (list user-home-dir
+                             user-xdg-runtime-dir
+                             user-xdg-cache-dir))
+             (setenv "HOME" user-home-dir)
+             (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+             (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+             (sleep 1) ;; give time to elogind or seatd
+             (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+             (dup2 1 2)
+             (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config)))))))
+
+(define-record-type* <greetd-wlgreet-color>
+  greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
+  (red greetd-wlgreet-color-red)
+  (green greetd-wlgreet-color-green)
+  (blue greetd-wlgreet-color-blue)
+  (opacity greetd-wlgreet-color-opacity))
+
+(define (greetd-wlgreet-color-for-section section-name color)
+  (match-record color <greetd-wlgreet-color>
+    (red green blue opacity)
+    (string-append
+     "[" section-name "]\n"
+     "red = " (number->string red) "\n"
+     "green = " (number->string green) "\n"
+     "blue = " (number->string blue) "\n"
+     "opacity = " (number->string opacity) "\n")))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background
+              (default (greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))))
+  (headline greetd-wlgreet-configuration-headline
+            (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt greetd-wlgreet-configuration-prompt
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt-error greetd-wlgreet-configuration-prompt-error
+                (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (border greetd-wlgreet-configuration-border
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1)))))
+
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (greetd-wlgreet-color-for-section section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
+                         (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-config command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
+  (match-record session <greetd-wlgreet-sway-session>
+    (sway)
     (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-wlgreet-sway-session-sway-config session)))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
@@ -3625,7 +3648,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3675,6 +3699,9 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3706,6 +3733,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 1c32076ccb2..923c71a7f89 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 15:03:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 10:03:00 2025
Received: from localhost ([127.0.0.1]:57495 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc4A7-0005jL-Vl
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:03:00 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55552)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc49w-0005hj-5L
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:49 -0500
Received: from localhost ([127.0.0.1]:36838)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49b-000000005NT-2Pc8;
 Sun, 26 Jan 2025 15:02:27 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=q5hwxOC65ckR23SXWY+qpp0nf/0Zot1TUnS4EWL1Cf4=; b=f+IClyBSch1xTHZoW5So+uKlhR
 H9XtNmEgyWtcZZT0uc8bSj7m/Q8Bfg/VcMah6Y791SPB4SpfeEzxyYpxV0oemVXzdYlsSUU/fc2jo
 vbyh233V98qhHrj3W9/UhdA4YLyjMvRqq42E/FJQruBe2gTkQX358WPZhrqREOaoJZPlsZo+qzGSz
 jery6o2YxCrK0WPQAxd68P9RG1jIdvgUmcY2hC6Uw3r68To/l8nHiC7GsMn14LFBpk0GcxO6Yf93A
 CtruBR0yCczmW7GoPixJ5yEFANT6fB07+C94P/Sbwx8JH/Zk9WdN7xvN1jFEASR8gV88cgarbmaDa
 wf3sT07SjwzpPj9jNCXgS9Ec+QWY+vBYzQnHitdWr7VHCR23BLPxWZI2dyo2mJXi3N+s+6+3LBEVv
 uAMrUzaPN469EVgRhX2GX3ObZqWJ66M8HSiLlutaKq7GLbxEmvT+2+ykBlyNWXKRRQHwzbtZPo0Qa
 WXR3KgJ0/cXbw0BJ6G2mMJqt;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49p-000000005KD-3PHL;
 Sun, 26 Jan 2025 18:02:41 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 75270 <at> debbugs.gnu.org
Subject: [PATCH v4 3/3] services: greetd: Add new gtkgreet greeter.
Date: Sun, 26 Jan 2025 18:02:33 +0300
Message-ID: <d73bad8de54e28427fc4edb663b610c8a7d159cc.1737903645.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737903645.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737903645.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: I10395a742fa7dee2c8ee2f92e80fe5c56a2e4fb6
---
 doc/guix.texi         | 48 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/base.scm | 33 +++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d74a8938a6d..b1a3558e8ff 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20594,8 +20594,9 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
-@code{gexp->script} like object to use as greeter.
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
+@code{greetd-gtkgreet-sway-session} or @code{gexp->script} like object to use
+as greeter.
 
 @end table
 @end deftp
@@ -20732,6 +20733,49 @@ Base Services
 @end lisp
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; Graphical greeter require additional group membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             ;; optionally use Adwaita:dark configured version
+             (gtkgreet gtkgreet-adwaita-dark)
+             (command
+              (greetd-user-session
+               ;; signal to our .bashrc that we want wayland compositor
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
+
+@item @code{sway-configuration} (default: @code{(plain-file "greetd-gtkgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{/bin/gtkgreet} command.
+
+@item @code{gtkgreet-style} (default: @code{(plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")})
+Extra CSS stylesheet to customize GTK look.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
+
+@end table
+@end deftp
+
 @node Scheduled Job Execution
 @subsection Scheduled Job Execution
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index c6098af8f4f..1b46bf76a25 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -279,6 +279,7 @@ (define-module (gnu services base)
             greetd-wlgreet-color
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
+            greetd-gtkgreet-sway-session
 
             %base-services))
 
@@ -3572,6 +3573,38 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
       sway
       (make-greetd-wlgreet-sway-session-sway-config session)))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default (plain-file "greetd-gtkgreet-sway-config" "")))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style
+                  (default (plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet gtkgreet-style command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l -s " gtkgreet-style " -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 15:03:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 10:02:59 2025
Received: from localhost ([127.0.0.1]:57493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc4A7-0005j7-1I
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:59 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55544)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc49v-0005hh-A4
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:48 -0500
Received: from localhost ([127.0.0.1]:36834)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49a-000000005NN-3Lm6;
 Sun, 26 Jan 2025 15:02:26 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=U3qjBAe9z2ppkCTBA39soIKMNqSEzJTz55b4B0S67aM=; b=Scu7Biwrn6D1/iNzkJb9LiJxMA
 /qA/KBoxNyUbiGaiqL/3wzycXVijzmhQHZUlrFz28RwZD8Vedf13/63tWuLWxGe+OPNLnTeGS77pV
 tvAJuO5tGvDIYfNWSA/aWqobkwKj+B98C2So2dZ0pHCUBU/8dbeh+fq3CWqJDCF4wkM1X2ZLzoiuT
 y23Jzs2Uup6RFqMQD3is3/8iB1oRCM1tJrasWLgHHqLjKq0TEgBua6qri82/IfWWuU8TB/K2dO4Ui
 3i2nZV8Dp/0i1GPKHWCyEa5EwLbyDBfPUu4XKk2bCWAsy1r+ShAHo9bDp1f1wO3VbMocnPIWDNSJ1
 Yy2XvW1wHzYxowmDNKvIsl1cqNaQ8v2taCtME39L/+3+HkJlvHiSVzQgX1KFtyz9I6UCQzEF8ak5o
 MdDmJ6YWlkgxJwQ9CrrgEXoPbDalesfLKkWVXNGFMuVFQhNKiqW+UUIZQW4zR2vHlRSvEZxN3bzZe
 ArsN11slFxAojUgc5o6HIsaT;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49p-000000005Jw-0OfX;
 Sun, 26 Jan 2025 18:02:41 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 75270 <at> debbugs.gnu.org
Subject: [PATCH v4 2/3] gnu: Add gtkgreet.
Date: Sun, 26 Jan 2025 18:02:32 +0300
Message-ID: <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737903645.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737903645.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737903645.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.
(gtkgreet-adwaita-dark): New variable.

Change-Id: I9f84c1011e66ae7c87191488930465685ae44569
---
 gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 659f7bc3bec..be6f00ce86b 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2025 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -5939,6 +5939,47 @@ (define-public wlgreet
 on a GUI toolkit.")
     (license license:gpl3)))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
+(define-public gtkgreet-adwaita-dark
+  (package
+   (inherit gtkgreet)
+   (name "gtkgreet-adwaita-dark")
+   (arguments
+    (list
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after 'install 'wrap-gtkgreet-for-theme
+                   (lambda _
+                     (wrap-program
+                      (string-append #$output "/bin/gtkgreet")
+                      '("GTK_THEME" "" = ("Adwaita:dark"))))))))
+   (inputs (modify-inputs
+            (package-inputs gtkgreet)
+            (prepend gnome-themes-extra)))))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 15:02:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 10:02:59 2025
Received: from localhost ([127.0.0.1]:57491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc4A6-0005j4-Ff
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:58 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55520)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc49t-0005hZ-Sb
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 10:02:46 -0500
Received: from localhost ([127.0.0.1]:36812)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49Z-000000005NA-0oOi;
 Sun, 26 Jan 2025 15:02:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=NrQeV8Z4LUf/udsLLs1h3rM21VSkD/XqS9c+eDVJDH0=; b=iYDbOXGF4brAZulbszOhirm71y
 u3gW8ingexkX/Asf/37smFlQ71ifRVG6BzHt754j28axi4RuWEE5KBvjk3hnnrCJu+elYF+BqTK2g
 0fXLgWwMSf4j16C0KMMbMNOgfJGH0aL0u5134C11D3YnK35iQoAxMtmcl31qXaj3Es+C2YQjIUcAL
 Xmd+dQJi0/WdUMfjZmw/ndHf5E+apXmNDdSLDlAuI9YqQJpqtaOw78m69VtZavONfCcn638k0YW8Y
 94GisvD+wj96YOdfEJ3s0+czKyxUnzkgVw6IcPATk8tZE0fCT8gW3hpmfRBXOoXe6lN1jv1Vx4hw5
 Wb+nn8e6ks2DkrZCJ3I0O8urbnVvJGhu5ZXfa+AGhB5/A7fq5zUxiGUXkmD7f12vWVzTQvD2qL3PD
 EyTfGhagPEWCK0K/RXwyV4ZBRktZ71Pv/sJFAqvD5zVwk5WtYqvgvlyK3cTOZy2N9pXGieTAZ1Nsp
 00WQeNvKnZbUNqtoMb1LcK15;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc49k-000000005JH-2nQ7;
 Sun, 26 Jan 2025 18:02:36 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN, =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 75270 <at> debbugs.gnu.org
Subject: [PATCH v4 0/3] services: greetd: Improve greeter configurations.
Date: Sun, 26 Jan 2025 18:02:30 +0300
Message-ID: <cover.1737903645.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <87tta5zbjp.fsf@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

Minor improvements and fixes compared to v3.

Improves greeter configuration and adds new gtkgreet greeter.
This will solve 64112, 65769 and 70605.
This will obsolete 70318.

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 161 ++++++++++++++++-----
 gnu/packages/admin.scm |  43 +++++-
 gnu/services/base.scm  | 311 ++++++++++++++++++++++++-----------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 362 insertions(+), 167 deletions(-)


base-commit: a895cc4c5bdb5d4bf8383077ef587ac18d069d7d
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 14:31:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 09:31:22 2025
Received: from localhost ([127.0.0.1]:55489 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc3fW-0000eF-0z
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:31:22 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:33576)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc3fT-0000dz-6T
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:31:19 -0500
Received: from localhost ([127.0.0.1]:43788)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3f8-000000005M6-1uuy;
 Sun, 26 Jan 2025 14:30:58 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=xPdfvEPRkoT1QZHIqQqZca9YwxsOwX+CuFFWJLiwBvk=; b=XcHHi299DENz3t20J4DwY6/8qy
 HZJJXoJDnrhGfHidslqbQK0h1Zu7VwgAr58JVqNHNav9LFhOMFHq0xKXjUDWYOjS2oq7LQuDPhpwG
 Hibf/kNsldsEMKTZRUPGqzfptqv4M8ISckaZ/sxVTKQUdqQJPoZ9+C2NYx038J7ES2c0PylLhymFJ
 0ZqszXmwbp/2w9iPFdwFLd0XTbrXkWAYBw+Mn9mHDJ0o8NOo+K4ugIqHvqvT6DqOt8EkmY2r7qlRg
 v4weU6PoMS526toLa8pB5Y39O7GY428K1/Re9nYIKiOkMP8eM7dkjowi+lWAA5UZw1k8YFV6FGKQA
 nJWUqbghn/TAWuLnyWMrGBTLOVCcERoXIZcoTDPQiYTQohIoNMnV0qv0GbJy+XKXdLETo7Chzdss7
 Zc+4Yzz5+9Ejj35zzzN1+xBfIGxCVH47bA5ns3Jdy7R+D+mUGn3+0uqG7NVH86MqqkotacbFs50su
 zF6xaun/k2bB8+xZJF63zAbu;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3fM-00000000485-1WEn;
 Sun, 26 Jan 2025 17:31:12 +0300
From: muradm <mail@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87a5bfaqvk.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Sat, 25 Jan 2025 15:51:27 +0100")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 <87y0zjmy2w.fsf@HIDDEN> <87tta5zbjp.fsf@HIDDEN>
 <87a5bfaqvk.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Sun, 26 Jan 2025 17:31:12 +0300
Message-ID: <875xm1sl3j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable


Hi,

Fixed in v4.

P.S. Sorry 75862, 75863, 75864 and 75865 was my bad due to missing=20
headers. But 75866, 75867, 75868 and 75869 should not happen.=20
75270 <at> debbugs.gnu.org was included in CC. WHat do you suggest to=20
do with them?

=2D-
Thanks in advance,
muradm

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

> Hi,
>
> muradm <mail@HIDDEN> skribis:
>
>> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>=20
>> writes:
>>
>>>> -@item @code{sway-configuration} (default: #f)
>>>> -File-like object providing an additional Sway configuration=20
>>>> file
>>>> to be
>>>> -prepended to the mandatory part of the configuration.
>>>> +@item @code{sway-config} (default: @code{(plain-file
>>>> "greetd-wlgreet-sway-config" "")})
>>>> +Extra configuration for sway to be included before executing
>>>> greeter.
>>>
>>> Could you retain the name of the existing field=20
>>> sway-configuration?
>>> Using abbreviations is uncommon in Guix, I think,
>>> [...]
>>> Also sway-configuration is used in many examples in the Guix
>>> manual.
>>
>> I'm not sure if it is so strict, there are a lot of places=20
>> where
>> 'config' is used. Is there a guideline for naming?
>
> It is rather strict, yes.  The guideline here would be:
>
>   https://guix.gnu.org/manual/devel/en/html_node/Formatting-Code.html
>
> Specifically Riastradh's Lisp Style Rules.
>
> As for changing the name of configuration fields: this is=20
> something to
> avoid because it breaks user configurations.  See the guidelines=20
> under
> =E2=80=9CServices=E2=80=9D at:
>
>   https://guix.gnu.org/manual/devel/en/html_node/Deprecation-Policy.html
>
> HTH!
>
> Ludo=E2=80=99.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmeWRzAACgkQ6M7O0mLO
BeLlpxAAuzh4/oibvQxMCnnDEEurw0Ja+xYLlMyXloee2FvWQFK96hEcYzsa1/ac
BN0YsT8eAxxBovYH6j6wcFj7wHA3/HzpE14WZL16usnwoSCco546QL74jX1k01Ge
7lEIYxys/lS+uG+Lf7m/q9uPNc6aamOuYu35YGg/Tb0RfEdQk4h3CoqHoKaJhLda
UTcCsd9iVRXhy9zaETScK6cVSqlOhAhG9ER83wqRcphi9FvqlzS94xHRmxk0/v0x
J5KLA2x+BuZh/XKckreYOuW9irJLxm5AXfUaeIowcTFp1hJCsBv0H20v/k4wsYag
zl35XTHsxuHpowQelw4i9iR3vKFigSdqsr8avEGbnVNbjzsYLM54oDHhISv3aMDm
RWXyTd3FmoetpmUO0so6Ivepy6VGyCoaKT3dbqWz4wtv/EyLLEgvMba4YkDzM1JD
SH84f+9oSqXG8DQPqsNJu0dm660ItjxTHKX/+WQN+JPjIo9tjlYddTh+9/WKSHDV
aB0iv/LlxqQ8Y7SqMWMNedF9Ia52xY538zHE1VW5C0jjjvkCDupBJoeGKzZyRTDf
2S3VoL9auVEUzoSZ0Wq3qG6xPTlEoHvjj/OZpX01fXWY74xzaDzpRV03BDFeU4Ky
GaMlcdQWJ57r1H3Enwa0hg+NF+Ch2ZZGA0HqR260Rd3E9V2T138=
=uXgZ
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 14:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 09:17:45 2025
Received: from localhost ([127.0.0.1]:55443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc3SK-0008A3-Fs
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:17:44 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:37920)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc3Pw-0005KO-4j
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:15:16 -0500
Received: from localhost ([127.0.0.1]:41026)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3Pb-000000005L5-0vec;
 Sun, 26 Jan 2025 14:14:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=q5hwxOC65ckR23SXWY+qpp0nf/0Zot1TUnS4EWL1Cf4=; b=iFT7ogM9Uf6EVnj+K+WZyhaJqB
 XNxNDGd+8pu5kiI4E/jbt+uQykxwuPbAv1eT0D/YTrdtTGCKOQO1S8IYAy3yhyAx5eGHT7GJlJV+3
 gbhK6fJCXvk08LC9LyWTE2/Q/45hkh7P2Au+kDvzXMCRmswfopqfTqspywNwM0Eqzs6nSlM1q61YO
 895P/DCGn17HsGMejZ7uulBf/q1qFDCbrZ/cZcxdWZkU4K5EYc8VNgH02Voe3RFfehWJf2A2puQPL
 0FKHVJqP54Bb+ai3yD6jCSAX2cbk3+Yq3Tr1vsOdLk3OQvO5c78tPQs4uj7UBLjSOhsnaENWXP4iT
 8p3YjvO/EQkfY9PjwvSQtu6HP/qs11OAQPkOAueB0JTp7DZ+lZX4HmTFd67Up6b1SxEBdJxpw6sXX
 e1iD8SDZKcY3SMuCaFmP93/+Wbqzk/e0EbYPchGT9RAkkMNE5Eu1NBcI06FEsK2Yd5oozArw9ajoz
 PdCk11eJgCMuhy3jMJ4IZKR0;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3Pp-000000003lj-27GR;
 Sun, 26 Jan 2025 17:15:09 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN,
	=?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
Subject: [PATCH v4 3/3] services: greetd: Add new gtkgreet greeter.
Date: Sun, 26 Jan 2025 17:15:09 +0300
Message-ID: <d73bad8de54e28427fc4edb663b610c8a7d159cc.1737900736.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737900736.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: I10395a742fa7dee2c8ee2f92e80fe5c56a2e4fb6
---
 doc/guix.texi         | 48 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/base.scm | 33 +++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d74a8938a6d..b1a3558e8ff 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20594,8 +20594,9 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
-@code{gexp->script} like object to use as greeter.
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
+@code{greetd-gtkgreet-sway-session} or @code{gexp->script} like object to use
+as greeter.
 
 @end table
 @end deftp
@@ -20732,6 +20733,49 @@ Base Services
 @end lisp
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; Graphical greeter require additional group membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             ;; optionally use Adwaita:dark configured version
+             (gtkgreet gtkgreet-adwaita-dark)
+             (command
+              (greetd-user-session
+               ;; signal to our .bashrc that we want wayland compositor
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
+
+@item @code{sway-configuration} (default: @code{(plain-file "greetd-gtkgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{/bin/gtkgreet} command.
+
+@item @code{gtkgreet-style} (default: @code{(plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")})
+Extra CSS stylesheet to customize GTK look.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
+
+@end table
+@end deftp
+
 @node Scheduled Job Execution
 @subsection Scheduled Job Execution
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index c6098af8f4f..1b46bf76a25 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -279,6 +279,7 @@ (define-module (gnu services base)
             greetd-wlgreet-color
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
+            greetd-gtkgreet-sway-session
 
             %base-services))
 
@@ -3572,6 +3573,38 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
       sway
       (make-greetd-wlgreet-sway-session-sway-config session)))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default (plain-file "greetd-gtkgreet-sway-config" "")))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style
+                  (default (plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet gtkgreet-style command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l -s " gtkgreet-style " -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 14:17:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 09:17:44 2025
Received: from localhost ([127.0.0.1]:55441 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc3SI-00089v-VA
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:17:44 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:55990)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc3Pb-0004wb-Ok
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:14:59 -0500
Received: from localhost ([127.0.0.1]:43080)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3PH-000000005Kt-0jPT;
 Sun, 26 Jan 2025 14:14:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=slP/WMdubJbEJXFVAvD4hHHUfoSKszeSep64WBD8peA=; b=ZjE8fc5dyxzieZJq4DkvBxGsC4
 X17tUmRA62Tdt3GNy/KLmbmNz1vUTurB5u+USgXGbsvVwa8Pkmq2ec1kGCmV8EN3Ob7bl3Pj09wxG
 K/18oLAn3BKpFc2vg0Qxxn0i410yEa/FMRY+ZqaGQfHGA7NOmkc0HJMrHcwNRlRmPyQI0gCSUlwtI
 WvloQU0H9VfRfja89uct1AlFUyZ6MQaZugUH/N27u/DUM43iTcVTCesgrqCOY/MMiT0IqQ62uuJeO
 Im+gvlN7z7FJ9w4aUEr/3xGeJoTO7YFLa4uyPoGgF+BMlAyAqCuifc9u8ox3eHEQopP67mRIbIBeO
 xDPeetesUypLlwc8ERkerARbCGONtcFv9gOJh8YW7T5R/z3gX6oxtsYCXMWFpPD8/0AsV5GsTUlvS
 8SKv1sIwxYN37Xl67RiAgt4UIpGPkVs6x0mcb/V2cvI3JhanDQFD4FvODCa6lWOr3zJiS51T7Vpk3
 rtwNywnMF2EZOw5Y8J7+k98Q;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3PV-000000003k0-1oYX;
 Sun, 26 Jan 2025 17:14:49 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN,
	=?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
Subject: [PATCH v4 1/3] services: greetd: Improve greeter configurations.
Date: Sun, 26 Jan 2025 17:14:46 +0300
Message-ID: <d96bf189a980be56e8a073fd0eb2210c61d0d357.1737900736.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737900736.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into `<greetd-user-session>`, which can be reused
as is with different greeters. By default it uses `bash` as
first user process. Then user normally starts additional programs
with `.profile` or `.bashrc`. Using `command`, `command-args` and
`extra-env` one can specify something else, which could be
`dbus-session` wrapped process, some desktop environment or else.
While its above is possible, one is still encouraged to use
`.bashrc`, `.profile` or similar.

It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
`wlgreet` requires compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored-out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-color>): New record, `wlgreet` color holder.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: I7d79f07e9aaac21673a7c84ee0f989a474d4749d
---
 doc/guix.texi         | 115 +++++++++++------
 gnu/services/base.scm | 278 +++++++++++++++++++++++-------------------
 gnu/tests/desktop.scm |  14 ++-
 3 files changed, 242 insertions(+), 165 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 9a53bdcd374..d74a8938a6d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20512,13 +20512,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20586,19 +20594,20 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command. Greeters require user command
+to be specified in some or another way. @code{greetd-user-session} provides a
+common command for that. User should prefer stable shell command like @code{bash},
+which can start actual user terminal shell, window manager or desktop environment
+with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
 Command to be started by @command{/bin/agreety} on successful login.
 
@@ -20608,6 +20617,10 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}. User environment may
+adapt depending on its value (normaly by @code{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
 before starting command. One should note that, @code{extra-env} variables
@@ -20616,60 +20629,86 @@ Base Services
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{/bin/agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-color
+
+@table @asis
+@item @code{red}
+Value of red.
+
+@item @code{green}
+Value of green.
+
+@item @code{blue}
+Value of blue.
+
+@item @code{opacity}
+Value of opacity.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
 @item @code{scale} (default: @code{1})
 Option to use for @code{scale} in the TOML configuration file.
 
-@item @code{background} (default: @code{'(0 0 0 0.9)})
+@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})
 RGBA list to use as the background colour of the login prompt.
 
-@item @code{headline} (default: @code{'(1 1 1 1)})
+@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the headline colour of the UI popup.
 
-@item @code{prompt} (default: @code{'(1 1 1 1)})
+@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the prompt colour of the UI popup.
 
-@item @code{prompt-error} (default: @code{'(1 1 1 1)})
+@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the error colour of the UI popup.
 
-@item @code{border} (default: @code{'(1 1 1 1)})
+@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
 @deftp {Data Type} greetd-wlgreet-sway-session
-Sway-specific configuration record for the wlgreet greetd greeter.
+Configuration record for the in sway wlgreet greetd greeter.
 
 @table @asis
-@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
-A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
-on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
-
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
 
-@item @code{sway-configuration} (default: #f)
-File-like object providing an additional Sway configuration file to be
-prepended to the mandatory part of the configuration.
+@item @code{sway-configuration} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{/bin/wlgreet} command.
+
+@item @code{wlgreet-configuration} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
 @end table
 
@@ -20677,8 +20716,7 @@ Base Services
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; Graphical greeter require additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20687,7 +20725,10 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
-              (local-file "sway-greetd.conf"))))))))
+              (local-file "sway-greetd.conf")) ;; optional extra sway configuration
+             (command
+              (greetd-user-session
+               (xdg-session-type "wayland")))))))))
 @end lisp
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 5967457002d..c6098af8f4f 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-color
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3393,161 +3395,182 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
-(define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session
+  greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
     (command command-args extra-env)
     (program-file
-     "agreety-tty-session-command"
+     "greetd-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+    (command command-args extra-env xdg-session-type)
     (program-file
-     "agreety-tty-xdg-session-command"
+     "greetd-xdg-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (let*
              ((username (getenv "USER"))
               (useruid (passwd:uid (getpwuid username)))
               (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
+           (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
            (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
+(define-record-type* <greetd-agreety-session>
+  greetd-agreety-session make-greetd-agreety-session
+  greetd-agreety-session?
+  (agreety greetd-agreety (default greetd))
+  (command greetd-agreety-command (default (greetd-user-session))))
+
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let ((agreety (file-append (greetd-agreety session) "/bin/agreety"))
+        (command (greetd-agreety-command session)))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
-
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
-  (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
-  (match color
-    ((red green blue opacity)
-     (string-append
-      "[" section-name "]\n"
-      "red = " (number->string red) "\n"
-      "green = " (number->string green) "\n"
-      "blue = " (number->string blue) "\n"
-      "opacity = " (number->string opacity) "\n"))))
-
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+     (program-file "agreety-wrapper" #~(execl #$agreety #$agreety "-c" #$command)))))
+
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     (with-imported-modules '((guix build utils))
+       #~(begin
+           (use-modules (guix build utils))
+
+           (let* ((username (getenv "USER"))
+                  (user (getpwnam username))
+                  (useruid (passwd:uid user))
+                  (usergid (passwd:gid user))
+                  (useruid-s (number->string useruid))
+                  ;; /run/user/<greeter-user-uid> won't exist yet
+                  ;; this will contain WAYLAND_DISPLAY socket file
+                  ;; and log-file below
+                  (user-home-dir "/tmp/.greeter-home")
+                  (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                  (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                  (log-file (string-append (number->string (getpid)) ".log"))
+                  (log-file (string-append user-home-dir "/" log-file)))
+             (for-each (lambda (d) (mkdir-p d) (chown d useruid usergid) (chmod d #o700))
+                       (list user-home-dir
+                             user-xdg-runtime-dir
+                             user-xdg-cache-dir))
+             (setenv "HOME" user-home-dir)
+             (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+             (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+             (sleep 1) ;; give time to elogind or seatd
+             (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+             (dup2 1 2)
+             (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config)))))))
+
+(define-record-type* <greetd-wlgreet-color>
+  greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
+  (red greetd-wlgreet-color-red)
+  (green greetd-wlgreet-color-green)
+  (blue greetd-wlgreet-color-blue)
+  (opacity greetd-wlgreet-color-opacity))
+
+(define (greetd-wlgreet-color-for-section section-name color)
+  (match-record color <greetd-wlgreet-color>
+    (red green blue opacity)
+    (string-append
+     "[" section-name "]\n"
+     "red = " (number->string red) "\n"
+     "green = " (number->string green) "\n"
+     "blue = " (number->string blue) "\n"
+     "opacity = " (number->string opacity) "\n")))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background
+              (default (greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))))
+  (headline greetd-wlgreet-configuration-headline
+            (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt greetd-wlgreet-configuration-prompt
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt-error greetd-wlgreet-configuration-prompt-error
+                (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (border greetd-wlgreet-configuration-border
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1)))))
+
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (greetd-wlgreet-color-for-section section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-configuration greetd-wlgreet-sway-session-sway-configuration
+                      (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-configuration greetd-wlgreet-sway-session-wlgreet-configuration
+                         (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-config command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
+  (match-record session <greetd-wlgreet-sway-session>
+    (sway)
     (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-wlgreet-sway-session-sway-config session)))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
@@ -3625,7 +3648,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3675,6 +3699,9 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3706,6 +3733,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 1c32076ccb2..923c71a7f89 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 14:16:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 09:16:03 2025
Received: from localhost ([127.0.0.1]:55427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc3Qf-0007Jo-Cl
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:16:03 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:59576)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc3Pm-0004x0-W7
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:15:08 -0500
Received: from localhost ([127.0.0.1]:60982)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3PS-000000005Kz-283t;
 Sun, 26 Jan 2025 14:14:46 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=U3qjBAe9z2ppkCTBA39soIKMNqSEzJTz55b4B0S67aM=; b=UtJz6MCAlh7xTS5dLF/21+w0+T
 wwFmoWj76XjpeDgOTc454cgF7NeYk0h05j6jkvSZWt4TwhGfKDQsHF3PVryzxA/VFN9+/z/1yA2Xy
 QJzHgo5wQhz7P9bA9lZcUbyiCsdPxKfbooLycdxpb5ucZ0t3TV8hlTNbpLtuuoWSZ9NOHrxuZGyWu
 5IepmEYge9em/tUI59MCeSKqun+iP1PetW3kwGOHcsEY5XLN2V/aOv3F8N7Q6wOyM8OWGDKvrXGlw
 ocjPTZqzxqDZKZBBrmu4AN7/353mUK3k3XDY8qvblyw5IRR2KnNGCE9ptS/1cvxKSQs52ca/gu5Nd
 xNn8PlkrSeyyb9lN303+l/+T74n4GO9eYs9fhMWcapDJsA7DKS0MtkzIxOhJ8fMB0bPAJfG9auSnI
 3O9ap/MWkRNwfb+AxrZT88EBOpdmPi2p939j+Skm6xGqj9kjrpFdVrnHuQgQRF3rdjPbbYj4WoYkU
 5gG0nFhy11oVxnxpAClR2BBX;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3Pg-000000003ks-3Ha0;
 Sun, 26 Jan 2025 17:15:00 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN,
	=?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
Subject: [PATCH v4 2/3] gnu: Add gtkgreet.
Date: Sun, 26 Jan 2025 17:14:57 +0300
Message-ID: <6bb94e32e65887a796c2344cbfa8060bbf56d166.1737900736.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1737900736.git.mail@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN> <cover.1737900736.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.
(gtkgreet-adwaita-dark): New variable.

Change-Id: I9f84c1011e66ae7c87191488930465685ae44569
---
 gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 659f7bc3bec..be6f00ce86b 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2025 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -5939,6 +5939,47 @@ (define-public wlgreet
 on a GUI toolkit.")
     (license license:gpl3)))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
+(define-public gtkgreet-adwaita-dark
+  (package
+   (inherit gtkgreet)
+   (name "gtkgreet-adwaita-dark")
+   (arguments
+    (list
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after 'install 'wrap-gtkgreet-for-theme
+                   (lambda _
+                     (wrap-program
+                      (string-append #$output "/bin/gtkgreet")
+                      '("GTK_THEME" "" = ("Adwaita:dark"))))))))
+   (inputs (modify-inputs
+            (package-inputs gtkgreet)
+            (prepend gnome-themes-extra)))))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 26 Jan 2025 14:14:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 26 09:14:47 2025
Received: from localhost ([127.0.0.1]:55404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tc3PT-0004wN-1B
	for submit <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:14:47 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:54158)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tc3PQ-0004w3-GJ
 for 75270 <at> debbugs.gnu.org; Sun, 26 Jan 2025 09:14:44 -0500
Received: from localhost ([127.0.0.1]:46718)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3P5-000000005Km-48NK;
 Sun, 26 Jan 2025 14:14:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=NrQeV8Z4LUf/udsLLs1h3rM21VSkD/XqS9c+eDVJDH0=; b=CX9leW3X4BC4Kji2ljVyw5QC1x
 HaLbCSyIBnqUG/GbmYZD44KtjUIXrYOnYuTPCjttCYk86MRhFej3T1omey2YTvbD+gq3/G3oQxMhJ
 ah3eqtq4haD1KJZxdlRV02CxNtv593th+0TKiORg/vLodYw2UQhaKebQyzEJjohY7fKa5B8KDHIfs
 BVttG87YOWVRPhOpJzXpk0uxeJBKpTqs50oOGVjycOgWm3X7bQksaRyRKA3yi9GsJ2yjIv/OnkjSI
 J47G9MDCHqACKZTYTu004+Wzoel2paaUpTe/6PdXuuovNIJyUG9zPICHFikC4GY+1/VEhmWM2q5Nk
 5MSucymMCHN3wXOdeg2CbxpoV7gteo1B6DpzoytlsbiMIxVIza6yhZv7N7zTtrd3mZwQ3f0XHC5C4
 bV2Tg4iL1N5A27ptmHxWGyy1vFlNW2I3oaDhIwPjknVQV87uCEnOwrv9DKODQSWCRP3Wj5J1+4++0
 klIujnuE9sSigAoV1cXTJtsW;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tc3PK-000000003j9-0r7d;
 Sun, 26 Jan 2025 17:14:38 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN,
	=?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
Subject: [PATCH v4 0/3] services: greetd: Improve greeter configurations.
Date: Sun, 26 Jan 2025 17:14:37 +0300
Message-ID: <cover.1737900736.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <87tta5zbjp.fsf@HIDDEN>
References: <87tta5zbjp.fsf@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

Minor improvements and fixes compared to v3.

Improves greeter configuration and adds new gtkgreet greeter.
This will solve 64112, 65769 and 70605.
This will obsolete 70318.

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 161 ++++++++++++++++-----
 gnu/packages/admin.scm |  43 +++++-
 gnu/services/base.scm  | 311 ++++++++++++++++++++++++-----------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 362 insertions(+), 167 deletions(-)


base-commit: a895cc4c5bdb5d4bf8383077ef587ac18d069d7d
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 25 Jan 2025 14:51:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 09:51:39 2025
Received: from localhost ([127.0.0.1]:49153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbhVb-0003rp-Ad
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 09:51:39 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:46824)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tbhVY-0003rW-Vk
 for 75270 <at> debbugs.gnu.org; Sat, 25 Jan 2025 09:51:37 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1tbhVS-0007qo-DC; Sat, 25 Jan 2025 09:51:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=xh3hgPNkk3M6d6uD2Pz+cicLsmcs+GfR9nbBEErOT/c=; b=Irw+iA+K7spjPsWbxAJ5
 FUI/9skA+CnO5dqSd4TJwoLGbmqHekPPL6gSTOTzkfaWF/qrI3Fkj6IKacrYbDTkYyuZhvWij+3Wd
 YSNWH/GqyFCF05H7nrPky0YySR6nIki8Elx5L3MewavEBtNzE0c37tLNsBvlMu7G/FMYNhhXSfbPy
 0Cc5A3AK3YsMgVEek5LMqhmBDWxqKIWe3+GzstmMnoPl2hQokyw4D9MdcIH5YCabqBv1dUdoWfDRZ
 TG/NvRD2RYj6f0ZjbcihNV/5WS4g98y8okZmscyPe/LH+jpfK+QulWSxL6iI060/SuH5yIJ72Qngw
 93saXaGzJZJ52w==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87tta5zbjp.fsf@HIDDEN> (muradm's message of "Sat, 11 Jan
 2025 17:10:18 +0300")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 <87y0zjmy2w.fsf@HIDDEN> <87tta5zbjp.fsf@HIDDEN>
Date: Sat, 25 Jan 2025 15:51:27 +0100
Message-ID: <87a5bfaqvk.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: 75270
Cc: 75270 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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: -3.3 (---)

Hi,

muradm <mail@HIDDEN> skribis:

> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> writes:
>
>>> -@item @code{sway-configuration} (default: #f)
>>> -File-like object providing an additional Sway configuration file
>>> to be
>>> -prepended to the mandatory part of the configuration.
>>> +@item @code{sway-config} (default: @code{(plain-file
>>> "greetd-wlgreet-sway-config" "")})
>>> +Extra configuration for sway to be included before executing
>>> greeter.
>>
>> Could you retain the name of the existing field sway-configuration?
>> Using abbreviations is uncommon in Guix, I think,
>> [...]
>> Also sway-configuration is used in many examples in the Guix
>> manual.
>
> I'm not sure if it is so strict, there are a lot of places where
> 'config' is used. Is there a guideline for naming?

It is rather strict, yes.  The guideline here would be:

  https://guix.gnu.org/manual/devel/en/html_node/Formatting-Code.html

Specifically Riastradh's Lisp Style Rules.

As for changing the name of configuration fields: this is something to
avoid because it breaks user configurations.  See the guidelines under
=E2=80=9CServices=E2=80=9D at:

  https://guix.gnu.org/manual/devel/en/html_node/Deprecation-Policy.html

HTH!

Ludo=E2=80=99.




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

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


Received: (at 75270) by debbugs.gnu.org; 11 Jan 2025 14:10:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 11 09:10:37 2025
Received: from localhost ([127.0.0.1]:41824 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tWcCD-0006Gh-7O
	for submit <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:10:37 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:51466)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tWcCA-0006GG-I9
 for 75270 <at> debbugs.gnu.org; Sat, 11 Jan 2025 09:10:35 -0500
Received: from localhost ([127.0.0.1]:34952)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tWc88-00088a-2k;
 Sat, 11 Jan 2025 14:06:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=ObyguCzp7JLy3hb9q5Q2IyR4KXl+YMtgg10/ZvdXoHc=; b=DBYcMxglKfxiYoucBWQO3rmVVy
 V4cGHH6+R05TI/2hWYpqEd7Js57VX8pXwk2viHiGaOSdUeNAnuznz2t/SySYJ0bSsH25014NHXhja
 hU7tTZZ9rUflfy4eLcEZfKf8v5TEfh/tTP6l6bJKnLAajEuuLO6m5R1+xPWX4MwCOBOfwuw/iSBBV
 qz0LwN8MRAjCFbpiAhQUR2pdjS91gZlOmdZaOzmZVZhcxIZUOoB1+zfGwitIsH2auOwVLYNj3mNPg
 dZatr9LM/xumYDibVIhLkhWUY8s515bk2D+owZhsZgs0G5ltnQFkTnGA5YVK+RX7PE0nomQlidN+k
 Uhe+tlCxM2E91iKMhSYSe6/xD5Rh9jW/8TTcQoIxqPfmyqsANLSQqFKwVZaV/+x/9WN23rs+KlB3f
 7TOLBOO6F7+KRhqBPYqCvT/TCvdQG7gw9Yqajwunm2WJtO8orTImoOGwcCzy6+iGRJ8QsgT9dr063
 L5ISbocbSDElDxznQ7LfTtB6;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tWcBu-0000000049A-1QPX;
 Sat, 11 Jan 2025 17:10:18 +0300
From: muradm <mail@HIDDEN>
To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87y0zjmy2w.fsf@HIDDEN> (pelzflorian@HIDDEN's
 message of "Thu, 09 Jan 2025 23:17:27 +0100")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 <87y0zjmy2w.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Sat, 11 Jan 2025 17:10:18 +0300
Message-ID: <87tta5zbjp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> writes:

>> -@item @code{sway-configuration} (default: #f)
>> -File-like object providing an additional Sway configuration 
>> file to be
>> -prepended to the mandatory part of the configuration.
>> +@item @code{sway-config} (default: @code{(plain-file 
>> "greetd-wlgreet-sway-config" "")})
>> +Extra configuration for sway to be included before executing 
>> greeter.
>
> Could you retain the name of the existing field 
> sway-configuration?
> Using abbreviations is uncommon in Guix, I think,
> [...]
> Also sway-configuration is used in many examples in the Guix
> manual.

I'm not sure if it is so strict, there are a lot of places where 
'config' is used. Is there a guideline for naming?
On the other hand `sway-config` is used deliberately in order to 
distinguish it from `<sway-configuration>` under `(gnu home 
services sway)`.
Also type of value here is not a fully blown serializable data 
structure, but a file like object having contents of 
`sway.config`.

> but more importantly changes would need to go through a 
> deprecation
> period with a news item and such, because the Guix API is stable 
> and
> we have a deprecation policy.

I don't think that it is worth it. IMHO `wlgreet` is not much in 
use, since it is broken for quite time.
Is there a threshold for when we have to strictly complicate stuff 
with deprecation tools?

>> +@item @code{wlgreet} (default: @code{wlgreet})
>> +The package with the @command{/bin/wlgreet} command.
>> +
>> +@item @code{wlgreet-config} (default: 
>> @code{(greetd-wlgreet-configuration)})
>> +Configuration of @code{wlgreet} represented by 
>> @code{greetd-wlgreet-configuration}.
>
> For analogy, I would name this wlgreet-configuration.

That could be done if necessary.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmeCe8oACgkQ6M7O0mLO
BeJZ+xAAsnPRlgKLXgBRVH8HIYjihnI0UPzoPrY3+dHd93DzSSedItDYPKSnq+Bq
HMoM2JaKH1zhKB3OZN7hB4eZkpFtZpbDDwWk7k9OF4bGMQHtTBT7jguYn3y0j5j2
9afnqxkT00/N6NSWCaD5FY+a9XaKaZCwudtgUfH0Kzbj2SUSQ5+K3F2ehORFB35I
wOKQjhhsZ9iA26Mm92ieVd+mvV4lcUGym8mrWaTiRAOihyqeHMYiludx07FvDWKI
+INjUrsp4rSKEJjt4MJMAyWtHi6rzg8De0MJ+HUjSpeUaWUhUPI7ncWHw2+OVu6j
4IAkQGtd6NU2XRyIw3hqxCsw4dkjBHrJd8Cbl1hdXWjF8DiJdK7zgOaMnzfMDfFh
WVWJ5MRKeeYZicnc+xav/KlwYYmReuFf7UdTKrHdGpjLTbGHojYHc7TmPBLXijw/
j0GEf7KTOlgzRwD7dde6n8Iri76bD1l5d/Dg2xEnIaAh2hq2Phu2qAqIcTeZ0TF7
3ZNNJoi6HdWF4Rd0V6V+ndFJFJ3Hru4HL0nLgzMavwMftsq63AsuUNt/fNoUz4YD
Iq8ZxoF190CrpWXB2vl+kuibyxPTfRhIQoCoJ5Ym4PI4S5ngErlcG6GsogiP4G1z
+gCIUqarfUhIATxsUEIo/QWrAfGcS+0gC+Xn5xFlYutdPM4HiJU=
=2UV0
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 9 Jan 2025 22:16:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 09 17:16:54 2025
Received: from localhost ([127.0.0.1]:54803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tW0ph-0000k6-Uc
	for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 17:16:54 -0500
Received: from relay.yourmailgateway.de ([188.68.63.162]:40175)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>)
 id 1tW0pf-0000js-1a
 for 75270 <at> debbugs.gnu.org; Thu, 09 Jan 2025 17:16:52 -0500
Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1])
 by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4YTfJx1CxHz41Rf;
 Thu,  9 Jan 2025 23:16:49 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1736461009;
 bh=CeJX9Syocwu08Vo32RHr5DQvTkSXl/X+MbDcg66QwOk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=j+MJ5HHr9tlg96AEp16pWDg0N3zdAv4kUm2zXiwjGcHVgfoAOUmIY1H5qG4bxtir+
 sJ2kLqLXBLEmbMw3uegS0/U/5HwITBL+tsP2uEwLcm1a6R6yF+V/KWqnbOvkqtcodD
 dqJem7fOpVqpoNx67bYDJw5tzpgvnnNM+sfoQ7+G9Ca0uRq6tnB++SOFhTsvVtclm3
 ks6qZCV5jwQuYntcRWz9Eix6ZT2I4a1x46r7q6httLxB50SJebpm7I6/MyR1Xl86Ts
 COLLHQD3mOHgOow2PyWUvRJ+RIF54sQIKdIN0s9BF7OUvgAE+ooQFkjDyN4goA7lw/
 TgbzsovhyblGQ==
Received: from policy02-mors.netcup.net (unknown [46.38.225.35])
 by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4YTfJx0Vyqz41R9;
 Thu,  9 Jan 2025 23:16:49 +0100 (CET)
Received: from mxe217.netcup.net (unknown [10.243.12.53])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YTfJv3lryz8sbH;
 Thu,  9 Jan 2025 23:16:47 +0100 (CET)
Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de
 [178.26.93.191])
 by mxe217.netcup.net (Postfix) with ESMTPSA id C0BA7843E9;
 Thu,  9 Jan 2025 23:16:38 +0100 (CET)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH v3 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
 (muradm's message of "Wed, 8 Jan 2025 20:47:41 +0300")
References: <cover.1736358380.git.mail@HIDDEN>
 <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
Date: Thu, 09 Jan 2025 23:17:27 +0100
Message-ID: <87y0zjmy2w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: C0BA7843E9
X-Rspamd-Server: rspamd-worker-8404
X-NC-CID: GrYHuKCBaId8wdn3SM3ueyymICG5aa/NXjsz0FIQuwDVktQoOW7WXbFT
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

Thank you muradm for simplifying greetd greeters.

muradm <mail@HIDDEN> writes:
> -@item @code{sway-configuration} (default: #f)
> -File-like object providing an additional Sway configuration file to be
> -prepended to the mandatory part of the configuration.
> +@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
> +Extra configuration for sway to be included before executing greeter.

Could you retain the name of the existing field sway-configuration?
Using abbreviations is uncommon in Guix, I think, but more importantly
changes would need to go through a deprecation period with a news item
and such, because the Guix API is stable and we have a deprecation
policy.  Also sway-configuration is used in many examples in the Guix
manual.


> +
> +@item @code{wlgreet} (default: @code{wlgreet})
> +The package with the @command{/bin/wlgreet} command.
> +
> +@item @code{wlgreet-config} (default: @code{(greetd-wlgreet-configuration)})
> +Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.

For analogy, I would name this wlgreet-configuration.

I have not yet done a full review of your patch; it will take time; I
hope somebody else does.

Regards,
Florian




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

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


Received: (at 75270) by debbugs.gnu.org; 8 Jan 2025 17:48:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 12:48:07 2025
Received: from localhost ([127.0.0.1]:48876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVaA2-0008SZ-MU
	for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:48:07 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52354)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tVa9r-0008R1-1v
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:48:00 -0500
Received: from localhost ([127.0.0.1]:35482)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tVa5y-0004Pf-10
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 17:43:54 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=R9px4pc3nM/7AAyoepLQ+R+E1pygKu0wNzqjHEzT+s8=; b=FyHPeavoNgpBRr6BMweZhAHhkV
 CBeeyWc/PHVH0yExooBhk2Yhr1nkV7H/D60PQdNKJ0ICq9Jf4RJVdzEUVsMDVIDxqM11wXSQcIE03
 WArxYJuMi2nCSVN8oovudaY43AXYm4vq7D3dCA1Cw4/P/eRyb0kBJrPhvk74ThiiC0z8RAF/cs6nd
 Z2Wu7RxXc+Y6C0i0OAMZ7MMMoGaeashBkCNUW58KDVt26DrIZfjwaS3DbW9z5SuUWZIwJM167nAjB
 +iDYspSDcH21hOwdh+klMqOtfyEMJ/90tFz/OeZx5CzF3O3jamVVWXqf5FuzZ8iMystLWZROaN9wV
 /cUatrOnmFQ+dULdDf9PUdIKxb9MPTaFqmYOTNzMSkofxipauG2s5VWU8/HGGRn8z7mkSQ2H6GhWr
 7WbSezDr9DXCO3lXLBnKyu2t9Y1DDeV56OWYTaxHvWHYD4hWq/GhhtQpWPmusLgOiuHNveV3FJb12
 Tgx0pHVf4CRzoq9fRW/TQFhj;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tVa9k-000000001mn-38Ty
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:47:48 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v3 3/3] services: greetd: Add new gtkgreet greeter.
Date: Wed,  8 Jan 2025 20:47:43 +0300
Message-ID: <07537fc2b7e7c5c2c9220d88ace006e4ca140962.1736358380.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736358380.git.mail@HIDDEN>
References: <cover.1736358380.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: Idb226862bb0fc57404ebb8bd46e2192d7d4e57c6
---
 doc/guix.texi         | 48 +++++++++++++++++++++++++++++++++++++++++--
 gnu/services/base.scm | 33 +++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index ba7b1761c3..28f94901ab 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20592,8 +20592,9 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
-@code{gexp->script} like object to use as greeter.
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session},
+@code{greetd-gtkgreet-sway-session} or @code{gexp->script} like object to use
+as greeter.
 
 @end table
 @end deftp
@@ -20730,6 +20731,49 @@ Base Services
 @end lisp
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; Graphical greeter require additional group membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             ;; optionally use Adwaita:dark configured version
+             (gtkgreet gtkgreet-adwaita-dark)
+             (command
+              (greetd-user-session
+               ;; signal to our .bashrc that we want wayland compositor
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
+
+@item @code{sway-config} (default: @code{(plain-file "greetd-gtkgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{/bin/gtkgreet} command.
+
+@item @code{gtkgreet-style} (default: @code{(plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")})
+Extra CSS stylesheet to customize GTK look.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
+
+@end table
+@end deftp
+
 @node Scheduled Job Execution
 @subsection Scheduled Job Execution
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b6d5e104a2..58f233770e 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -279,6 +279,7 @@ (define-module (gnu services base)
             greetd-wlgreet-color
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
+            greetd-gtkgreet-sway-session
 
             %base-services))
 
@@ -3560,6 +3561,38 @@ (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
       sway
       (make-greetd-wlgreet-sway-session-sway-config session)))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-gtkgreet-sway-config" "")))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (gtkgreet-style greetd-gtkgreet-sway-session-gtkgreet-style
+                  (default (plain-file "greetd-gtkgreet-sway-gtkgreet-style.css" "")))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet gtkgreet-style command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l -s " gtkgreet-style " -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
   greetd-terminal-configuration?
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 8 Jan 2025 17:48:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 12:48:06 2025
Received: from localhost ([127.0.0.1]:48874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVaA1-0008SW-VS
	for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:48:06 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52342)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tVa9q-0008Qz-DO
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:47:59 -0500
Received: from localhost ([127.0.0.1]:35472)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tVa5x-0004Pc-1u
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 17:43:53 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=c3oE+5l1lqAHoaGW0VMm2imjKlEQkhq9te5Ukm/h4n4=; b=ScViH3A6tX3neFOJJqvfaTeXYC
 tgGWdPNg5TWmd3UBfRYNM5OK06NRFJaG4wqEFcqtnZ4S7q4M4w7j/53TAJTNJ+aIPI6pF7O1m9idy
 3IY0Hww/RtgYWeABVPGbsaZYfF9tmgzcV4JLQ05v8098zAX44L0lAOmUc7KG9mcBUUO4lgX2V90rk
 MK6g2Yzj7v0TyGigmJOtyGDvEY88B9oNsvP/rPs6ppyE9Hj9sw9mt9XGZ6Ie3HevQ3hSRMUkEV/eL
 n8rdJAdMy8Ou0EqloWZrNSpXE0qsVQsWCHwMDrErY8h8RrwfAE7109oh+whuuJLWQ8To5vRgtGEF1
 jLuFM18Ct2sWvN/sy0nrTwVKlJiTTqjes3FQrSkRL47C617S7afA5qAzBuyzYfysSS6eLGspLZlME
 dSx/Dn1i2tTC1bOdqgfvuSVlwoPfdWizphl2jFZORDMqotlSpo+DqdIeaiytQfO66mOsyXP2ML5QE
 TLCs3uDBoEpBAtFukbCEtFyr;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tVa9k-000000001mU-03Ni
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:47:48 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v3 2/3] gnu: Add gtkgreet.
Date: Wed,  8 Jan 2025 20:47:42 +0300
Message-ID: <695487839ec4cb22a445379c109ee1682deea9ad.1736358380.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736358380.git.mail@HIDDEN>
References: <cover.1736358380.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.
(gtkgreet-adwaita-dark): New variable.

Change-Id: Ib0159b4a993113560f641b4877b826ff337e5c93
---
 gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 466df65dd9..42efdb1562 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2024 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -5831,6 +5831,47 @@ (define-public wlgreet
 on a GUI toolkit.")
       (license license:gpl3))))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
+(define-public gtkgreet-adwaita-dark
+  (package
+   (inherit gtkgreet)
+   (name "gtkgreet-adwaita-dark")
+   (arguments
+    (list
+     #:phases
+     #~(modify-phases
+        %standard-phases
+        (add-after 'install 'wrap-gtkgreet-for-theme
+                   (lambda _
+                     (wrap-program
+                      (string-append #$output "/bin/gtkgreet")
+                      '("GTK_THEME" "" = ("Adwaita:dark"))))))))
+   (inputs (modify-inputs
+            (package-inputs gtkgreet)
+            (prepend gnome-themes-extra)))))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 8 Jan 2025 17:48:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 12:48:01 2025
Received: from localhost ([127.0.0.1]:48868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVa9w-0008Rh-41
	for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:48:01 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52338)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tVa9p-0008Qy-MA
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:47:58 -0500
Received: from localhost ([127.0.0.1]:35460)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tVa5w-0004PZ-1p
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 17:43:52 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Q0GMR7FJ0W65aRfyUYg/IAX6WzEgHOQxH0HmJ0475gk=; b=XSsOsMsRyFUegz99Row0LO6gfd
 XaEQ/1aMzyaYSJRYFVsRzs9cBREpyUPQg8EQsnY44diAGL55muaJApHcBMBqs6K3ommvj9DvM9OxR
 cTW1FOwWUorvcWkpA59eaLphHNrjhlDjoKFbVOUnvTU9REIrt6UZ7N+J1F/872+nZVUxjMKkVZeST
 gUzpV3+uq90lmclz1IvdaPnsN2T1qP/Hhwj7pn+TBsEVC3UKf0umtTOXCvxVYQ+rTN4BABA43EiEv
 4MbVn7CZ1A6/9HkxGKRCQg7wSD6WW20d90as5bvKCz+d86qVke6YdC/QlVxCSaxJLDIoe6ZIK4Gs8
 CxcrKTKL+shFQnrMZRELj5iYMY7hRIky/esABg/qqGlJGno1yTuA6IrCwjYFCNA+Nwv9HSp40Sa8U
 jhaYfzwL0DzLHmP6WZyMrxiZoT+Zv9GjSMwe2gxmIi8thu7B04AGq8E29+5o1PKbcv+1gtf6fQBiE
 rJo7HArOaGsaB5kFWA+kvGeS;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tVa9j-000000001m6-00BE
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:47:47 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v3 1/3] services: greetd: Improve greeter configurations.
Date: Wed,  8 Jan 2025 20:47:41 +0300
Message-ID: <d64e729e4a7dcbf973c65a7c0408c7b4d825cdcf.1736358380.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736358380.git.mail@HIDDEN>
References: <cover.1736358380.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into `<greetd-user-session>`, which can be reused
as is with different greeters. By default it uses `bash` as
first user process. Then user normally starts additional programs
with `.profile` or `.bashrc`. Using `command`, `command-args` and
`extra-env` one can specify something else, which could be
`dbus-session` wrapped process, some desktop environment or else.
While its above is possible, one is still encouraged to use
`.bashrc`, `.profile` or similar.

It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
`wlgreet` requires compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored-out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-color>): New record, `wlgreet` color holder.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: I823b5075a5a7b2db49add1128b6e6e4eb64fcfd8
---
 doc/guix.texi         | 115 +++++++++++------
 gnu/services/base.scm | 278 +++++++++++++++++++++++-------------------
 gnu/tests/desktop.scm |  14 ++-
 3 files changed, 242 insertions(+), 165 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index caebe3b03c..ba7b1761c3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20510,13 +20510,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20584,19 +20592,20 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command. Greeters require user command
+to be specified in some or another way. @code{greetd-user-session} provides a
+common command for that. User should prefer stable shell command like @code{bash},
+which can start actual user terminal shell, window manager or desktop environment
+with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
 Command to be started by @command{/bin/agreety} on successful login.
 
@@ -20606,6 +20615,10 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}. User environment may
+adapt depending on its value (normaly by @code{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
 before starting command. One should note that, @code{extra-env} variables
@@ -20614,60 +20627,86 @@ Base Services
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{/bin/agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-color
+
+@table @asis
+@item @code{red}
+Value of red.
+
+@item @code{green}
+Value of green.
+
+@item @code{blue}
+Value of blue.
+
+@item @code{opacity}
+Value of opacity.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
 @item @code{scale} (default: @code{1})
 Option to use for @code{scale} in the TOML configuration file.
 
-@item @code{background} (default: @code{'(0 0 0 0.9)})
+@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})
 RGBA list to use as the background colour of the login prompt.
 
-@item @code{headline} (default: @code{'(1 1 1 1)})
+@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the headline colour of the UI popup.
 
-@item @code{prompt} (default: @code{'(1 1 1 1)})
+@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the prompt colour of the UI popup.
 
-@item @code{prompt-error} (default: @code{'(1 1 1 1)})
+@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the error colour of the UI popup.
 
-@item @code{border} (default: @code{'(1 1 1 1)})
+@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
 @deftp {Data Type} greetd-wlgreet-sway-session
-Sway-specific configuration record for the wlgreet greetd greeter.
+Configuration record for the in sway wlgreet greetd greeter.
 
 @table @asis
-@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
-A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
-on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
-
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
 
-@item @code{sway-configuration} (default: #f)
-File-like object providing an additional Sway configuration file to be
-prepended to the mandatory part of the configuration.
+@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{/bin/wlgreet} command.
+
+@item @code{wlgreet-config} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
 @end table
 
@@ -20675,8 +20714,7 @@ Base Services
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; Graphical greeter require additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20685,7 +20723,10 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
-              (local-file "sway-greetd.conf"))))))))
+              (local-file "sway-greetd.conf")) ;; optional extra sway configuration
+             (command
+              (greetd-user-session
+               (xdg-session-type "wayland")))))))))
 @end lisp
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 75ce4e8fe5..b6d5e104a2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-color
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3381,161 +3383,182 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
-(define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session
+  greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
     (command command-args extra-env)
     (program-file
-     "agreety-tty-session-command"
+     "greetd-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+    (command command-args extra-env xdg-session-type)
     (program-file
-     "agreety-tty-xdg-session-command"
+     "greetd-xdg-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (let*
              ((username (getenv "USER"))
               (useruid (passwd:uid (getpwuid username)))
               (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
+           (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
            (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
+(define-record-type* <greetd-agreety-session>
+  greetd-agreety-session make-greetd-agreety-session
+  greetd-agreety-session?
+  (agreety greetd-agreety (default greetd))
+  (command greetd-agreety-command (default (greetd-user-session))))
+
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let ((agreety (file-append (greetd-agreety session) "/bin/agreety"))
+        (command (greetd-agreety-command session)))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
-
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
-  (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
-  (match color
-    ((red green blue opacity)
-     (string-append
-      "[" section-name "]\n"
-      "red = " (number->string red) "\n"
-      "green = " (number->string green) "\n"
-      "blue = " (number->string blue) "\n"
-      "opacity = " (number->string opacity) "\n"))))
-
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+     (program-file "agreety-wrapper" #~(execl #$agreety #$agreety "-c" #$command)))))
+
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     (with-imported-modules '((guix build utils))
+       #~(begin
+           (use-modules (guix build utils))
+
+           (let* ((username (getenv "USER"))
+                  (user (getpwnam username))
+                  (useruid (passwd:uid user))
+                  (usergid (passwd:gid user))
+                  (useruid-s (number->string useruid))
+                  ;; /run/user/<greeter-user-uid> won't exist yet
+                  ;; this will contain WAYLAND_DISPLAY socket file
+                  ;; and log-file below
+                  (user-home-dir "/tmp/.greeter-home")
+                  (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                  (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                  (log-file (string-append (number->string (getpid)) ".log"))
+                  (log-file (string-append user-home-dir "/" log-file)))
+             (for-each (lambda (d) (mkdir-p d) (chown d useruid usergid) (chmod d #o700))
+                       (list user-home-dir
+                             user-xdg-runtime-dir
+                             user-xdg-cache-dir))
+             (setenv "HOME" user-home-dir)
+             (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+             (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+             (sleep 1) ;; give time to elogind or seatd
+             (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+             (dup2 1 2)
+             (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config)))))))
+
+(define-record-type* <greetd-wlgreet-color>
+  greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
+  (red greetd-wlgreet-color-red)
+  (green greetd-wlgreet-color-green)
+  (blue greetd-wlgreet-color-blue)
+  (opacity greetd-wlgreet-color-opacity))
+
+(define (greetd-wlgreet-color-for-section section-name color)
+  (match-record color <greetd-wlgreet-color>
+    (red green blue opacity)
+    (string-append
+     "[" section-name "]\n"
+     "red = " (number->string red) "\n"
+     "green = " (number->string green) "\n"
+     "blue = " (number->string blue) "\n"
+     "opacity = " (number->string opacity) "\n")))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background
+              (default (greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))))
+  (headline greetd-wlgreet-configuration-headline
+            (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt greetd-wlgreet-configuration-prompt
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt-error greetd-wlgreet-configuration-prompt-error
+                (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (border greetd-wlgreet-configuration-border
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1)))))
+
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (greetd-wlgreet-color-for-section section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-config greetd-wlgreet-sway-session-wlgreet-config
+                  (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-config command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
+  (match-record session <greetd-wlgreet-sway-session>
+    (sway)
     (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-wlgreet-sway-session-sway-config session)))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
@@ -3613,7 +3636,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3663,6 +3687,9 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(let ((d "/run/user")) (mkdir d #o755) (chmod d #o755)))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3694,6 +3721,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index ef30442886..1693bbcebf 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 8 Jan 2025 17:48:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 12:47:59 2025
Received: from localhost ([127.0.0.1]:48866 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVa9v-0008RY-Kz
	for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:47:59 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52334)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tVa9p-0008Qv-8i
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:47:57 -0500
Received: from localhost ([127.0.0.1]:54132)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tVa5v-0004PW-2k
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 17:43:51 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:
 From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=ezN3jyajdhFB0X1wYF3b122LiMPUZNjLT8n9ehC4Kw8=; b=Y7u0PLCHSYfPBeDKKJSBW1x4/g
 7mq+ct8hK8Rw+J4mQiY7YvXyvAUEXNglvHvrE2SGSto9vQiBw/pS/3bCNJZiCxVCrIg1Slgo82Ztp
 UCyKIWtesIje/rbTM2bNO0s5uKfd/PWrrugd+JRQTQvbETavcjSM1m3KEsHMBd2MV/a3IFmY03J9P
 dBqJg3Kuo1dtpRo1CaL3Hl2/TBJPORl5AQHllUuLaE597D8SuCs2d0Si9Etado7nO4C/W43sb+7Ie
 +ILiapLqNNq1dQO8NMaio08zAb03YK2hpgmSTpxW99pzjDN1hR6ZsFX/W8lhyWsMEgac6kbY9YujF
 Fgkp5jTVlh99asSGTcfrrfWSV/4+5cHSd/S/lVj0WXk0GQGJPOyxgPmzTQF1HifqsdeHWIjYejuLj
 rfnnI6GYRify/UzbqFu/p2B5TAUokDivMA17vBT64nbeO+Bdo/YybmUwnDblAHUphLgh/JV8HEI5p
 /FKFNK74n3TSDsI8rwakj2GL;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tVa9h-000000001lp-3d1w
 for 75270 <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:47:45 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v3 0/3] services: greetd: Improve greeter configurations.
Date: Wed,  8 Jan 2025 20:47:40 +0300
Message-ID: <cover.1736358380.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

Minor improvements and fixes compared to v2.

Improves greeter configuration and adds new gtkgreet greeter.
This will solve 64112, 65769 and 70605.
This will obsolete 70318.

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 161 ++++++++++++++++-----
 gnu/packages/admin.scm |  43 +++++-
 gnu/services/base.scm  | 311 ++++++++++++++++++++++++-----------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 362 insertions(+), 167 deletions(-)


base-commit: 911f205ddadf8255caa123671ccbb4efb9250ead
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:59:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:59:00 2025
Received: from localhost ([127.0.0.1]:56929 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU7UI-00020p-Lj
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:59:00 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52320)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tU7UC-0001zt-Eh
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:56 -0500
Received: from localhost ([127.0.0.1]:54834)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tU7QO-0001uo-1G
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 16:54:56 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=3lUi2ynPu5QXQ3s4H1qRhTvl6Kc7fHfP4eHI+Ira3EI=; b=Dp42CnRx3vrDw19zGkDSvgndeB
 4y+p8NBZ8JkEIC/wR0PNjakytQDl6RPRIfSZX9xX0IlN7G1repZ2SGfluZgIHWGSOG1tQho7i97Xf
 S/+SNngtIr92ltdpaqNUpBK9lm+A7EMA6QjLSHlbUsXBBslGFhccOTH0aEMppKzalDcltFcisMcFV
 Q/w80IJP+nL3SJY32ihBD61qJR+LyAZKdUISdyGRwXWBSaZ9oa0PKn2uWivM5EIqJpBn4ENBSUvtK
 ok5ZbBiKkDEwjp+RMUc3KlMu/pL5i+CRfsHeyFfjVoV2oz3Hf3iJeRKJt+IDnhdn9gQZw4/HCw+ap
 pljhA20A7pKL+FLapPItrhlaGihf8r31YJUKet6h/7fb4+wiWWxsW95nuYU6owHDdk8vC0C5IzBAU
 unxTKGw7DBmFb52JJzBpZhf0I363BYxhpL9b3DJdFXwc+i+mL2Y8SpUhXFL+gdpbc3o2dGxes1PQ4
 Wok6vlno1R8WqcjLcpaHlPhd;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tU7U6-000000003Uv-00r0
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 19:58:46 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v2 1/3] services: greetd: Improve greeter configurations.
Date: Sat,  4 Jan 2025 19:58:41 +0300
Message-ID: <a30ec51224da27d0887de636c8fd1a83ca3ba63d.1736009605.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736009605.git.mail@HIDDEN>
References: <cover.1736009605.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. Now user session entry point is
factored out into `<greetd-user-session>`, which can be reused
as is with different greeters. By default it uses `bash` as
first user process. Then user normally starts additional programs
with `.profile` or `.bashrc`. Using `command`, `command-args` and
`extra-env` one can specify something else, which could be
`dbus-session` wrapped process, some desktop environment or else.
While its above is possible, one is still encouraged to use
`.bashrc`, `.profile` or similar.

It also fixes incorrect use of `XDG_RUNTIME_DIR` for `wlgreet`.
`wlgreet` requires compositor to run. We provide common sway based
greeter script, which can be shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored-out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-color>): New record, `wlgreet` color holder.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: Id957801bd67d24281bea6b3c554a8853f7cb55e3
---
 doc/guix.texi         | 115 ++++++++++++------
 gnu/services/base.scm | 276 +++++++++++++++++++++++-------------------
 gnu/tests/desktop.scm |  14 ++-
 3 files changed, 240 insertions(+), 165 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 924f13f0f6..6d0c349b1a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20510,13 +20510,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20584,19 +20592,20 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command. Greeters require user command
+to be specified in some or another way. @code{greetd-user-session} provides a
+common command for that. User should prefer stable shell command like @code{bash},
+which can start actual user terminal shell, window manager or desktop environment
+with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
 Command to be started by @command{/bin/agreety} on successful login.
 
@@ -20606,6 +20615,10 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}. User environment may
+adapt depending on its value (normaly by @code{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
 before starting command. One should note that, @code{extra-env} variables
@@ -20614,60 +20627,86 @@ Base Services
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{/bin/agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-color
+
+@table @asis
+@item @code{red}
+Value of red.
+
+@item @code{green}
+Value of green.
+
+@item @code{blue}
+Value of blue.
+
+@item @code{opacity}
+Value of opacity.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
 @item @code{scale} (default: @code{1})
 Option to use for @code{scale} in the TOML configuration file.
 
-@item @code{background} (default: @code{'(0 0 0 0.9)})
+@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})
 RGBA list to use as the background colour of the login prompt.
 
-@item @code{headline} (default: @code{'(1 1 1 1)})
+@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the headline colour of the UI popup.
 
-@item @code{prompt} (default: @code{'(1 1 1 1)})
+@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the prompt colour of the UI popup.
 
-@item @code{prompt-error} (default: @code{'(1 1 1 1)})
+@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the error colour of the UI popup.
 
-@item @code{border} (default: @code{'(1 1 1 1)})
+@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
 @deftp {Data Type} greetd-wlgreet-sway-session
-Sway-specific configuration record for the wlgreet greetd greeter.
+Configuration record for the in sway wlgreet greetd greeter.
 
 @table @asis
-@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
-A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
-on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
-
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
 
-@item @code{sway-configuration} (default: #f)
-File-like object providing an additional Sway configuration file to be
-prepended to the mandatory part of the configuration.
+@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{/bin/wlgreet} command.
+
+@item @code{wlgreet-config} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
 @end table
 
@@ -20675,8 +20714,7 @@ Base Services
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; Graphical greeter require additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20685,7 +20723,10 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
-              (local-file "sway-greetd.conf"))))))))
+              (local-file "sway-greetd.conf")) ;; optional extra sway configuration
+             (command
+              (greetd-user-session
+               (xdg-session-type "wayland")))))))))
 @end lisp
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 75ce4e8fe5..4105da6c05 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-color
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3381,161 +3383,177 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
-(define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session
+  greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
     (command command-args extra-env)
     (program-file
-     "agreety-tty-session-command"
+     "greetd-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+    (command command-args extra-env xdg-session-type)
     (program-file
-     "agreety-tty-xdg-session-command"
+     "greetd-xdg-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (let*
              ((username (getenv "USER"))
               (useruid (passwd:uid (getpwuid username)))
               (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
+           (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
            (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
+(define-record-type* <greetd-agreety-session>
+  greetd-agreety-session make-greetd-agreety-session
+  greetd-agreety-session?
+  (agreety greetd-agreety (default greetd))
+  (command greetd-agreety-command (default (greetd-user-session))))
+
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let ((agreety (file-append (greetd-agreety session) "/bin/agreety"))
+        (command (greetd-agreety-command session)))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
-
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
-  (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
-  (match color
-    ((red green blue opacity)
-     (string-append
-      "[" section-name "]\n"
-      "red = " (number->string red) "\n"
-      "green = " (number->string green) "\n"
-      "blue = " (number->string blue) "\n"
-      "opacity = " (number->string opacity) "\n"))))
-
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+     (program-file "agreety-wrapper" #~(execl #$agreety #$agreety "-c" #$command)))))
+
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     #~(begin
+         (let* ((username (getenv "USER"))
+                (useruid (passwd:uid (getpwuid username)))
+                (useruid (number->string useruid))
+                ;; /run/user/<greeter-user-uid> won't exist yet
+                ;; this will contain WAYLAND_DISPLAY socket file
+                ;; and log-file below
+                (user-home-dir "/tmp/.greeter-home")
+                (user-xdg-runtime-dir (string-append user-home-dir "/run"))
+                (user-xdg-cache-dir (string-append user-home-dir "/cache"))
+                (log-file (string-append (number->string (getpid)) ".log"))
+                (log-file (string-append user-xdg-runtime-dir "/" log-file)))
+           (for-each (lambda (dir) (mkdir dir #o700))
+                     (list user-home-dir
+                           user-xdg-runtime-dir
+                           user-xdg-cache-dir))
+           (setenv "HOME" user-home-dir)
+           (setenv "XDG_CACHE_DIR" user-xdg-cache-dir)
+           (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+           (sleep 1) ;; give time to elogind or seatd
+           (dup2 (open-fdes log-file (logior O_CREAT O_WRONLY O_APPEND) #o640) 1)
+           (dup2 1 2)
+           (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))
+
+(define-record-type* <greetd-wlgreet-color>
+  greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
+  (red greetd-wlgreet-color-red)
+  (green greetd-wlgreet-color-green)
+  (blue greetd-wlgreet-color-blue)
+  (opacity greetd-wlgreet-color-opacity))
+
+(define (greetd-wlgreet-color-for-section section-name color)
+  (match-record color <greetd-wlgreet-color>
+    (red green blue opacity)
+    (string-append
+     "[" section-name "]\n"
+     "red = " (number->string red) "\n"
+     "green = " (number->string green) "\n"
+     "blue = " (number->string blue) "\n"
+     "opacity = " (number->string opacity) "\n")))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background
+              (default (greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))))
+  (headline greetd-wlgreet-configuration-headline
+            (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt greetd-wlgreet-configuration-prompt
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt-error greetd-wlgreet-configuration-prompt-error
+                (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (border greetd-wlgreet-configuration-border
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1)))))
+
+(define (make-greetd-wlgreet-config command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (greetd-wlgreet-color-for-section section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-config greetd-wlgreet-sway-session-wlgreet-config
+                  (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-config command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
+  (match-record session <greetd-wlgreet-sway-session>
+    (sway)
     (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-wlgreet-sway-session-sway-config session)))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
@@ -3613,7 +3631,8 @@ (define (greetd-accounts config)
          (name "greeter")
          (group "greeter")
          (supplementary-groups (greetd-greeter-supplementary-groups config))
-         (system? #t))))
+         (system? #t)
+         (create-home-directory? #f))))
 
 (define (make-greetd-pam-mount-conf-file config)
   (computed-file
@@ -3663,6 +3682,12 @@ (define (greetd-pam-service config)
                              (list optional-pam-mount))))
            pam))))))
 
+(define (greetd-run-user-activation config)
+  #~(begin
+      (let ((directory "/run/user"))
+        (mkdir directory #o755)
+        (chmod directory #o755))))
+
 (define (greetd-shepherd-services config)
   (map
    (lambda (tc)
@@ -3694,6 +3719,7 @@ (define greetd-service-type
     (list
      (service-extension account-service-type greetd-accounts)
      (service-extension file-system-service-type (const %greetd-file-systems))
+     (service-extension activation-service-type greetd-run-user-activation)
      (service-extension etc-service-type greetd-etc-service)
      (service-extension pam-root-service-type greetd-pam-service)
      (service-extension shepherd-root-service-type greetd-shepherd-services)))
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index ef30442886..1693bbcebf 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:58:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:58:58 2025
Received: from localhost ([127.0.0.1]:56927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU7UI-00020i-1A
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:58 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52346)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tU7UD-0001zw-MF
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:54 -0500
Received: from localhost ([127.0.0.1]:54862)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tU7QP-0001uu-2a
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 16:54:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=LyKUMIFhH5gL4ggbd5lbFNo+0XFD2zpkbzuY9NNBEc0=; b=BNPEhbv+GFSNsZ4wz+Z9h1YR03
 vMaeSDZTmoWMyn6VusUFZg4PylRCGob+OXkU48niNrwS/bFElwt7WE+QfQ8oi9cppEugwCnc6WEA/
 BysgYn+nLUbQwJTGd5R93XBpi/C5u+5RIe9tqpQ51NHHH31F0TJJrnW9XdwC29aicbwWiyznRlS5b
 D6y3RNdqzJbut5uT122r0YCc7gVsd8+VcEao4YLX0NzQX3UK8Zw57+muZFtVHBb6M9MUIhIe2M9GA
 RHiqUCTb6A36VYbABCOL6QtqDlTwnHMEGLFGRsHEBiy0msjtUJsEPS47XuP+cgqcyv3GIexsGLviA
 mQP6DpogEjBwQujPd41vHNoB+Mk7V0v0hGLbfj8jHPJZGi3FAoCKWqW88zsMoFu6cRBD9NI4uR0W1
 HwM27GbO3kuJYNx8RqNQIGrInBCnc6gCrTLmkKVBSuhNvxwEd4JMMkjO23rAEaiLhdikspNHFPCDc
 IUDKEVREDl6o8RkLsxUtsE9v;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tU7U7-000000003VT-278t
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 19:58:47 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v2 3/3] services: greetd: Add new gtkgreet greeter.
Date: Sat,  4 Jan 2025 19:58:43 +0300
Message-ID: <78237de4acba4caf53dbfbfc358da29eb0bce2b5.1736009605.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736009605.git.mail@HIDDEN>
References: <cover.1736009605.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: I7af64ac6f12cc30ee358df73db57b41ac42b8aca
---
 doc/guix.texi         | 38 ++++++++++++++++++++++++++++++++++++++
 gnu/services/base.scm | 31 +++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6d0c349b1a..819d1de79f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20642,6 +20642,44 @@ Base Services
 @end table
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; Graphical greeter require additional group membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             (command
+              (greetd-user-session
+               ;; signal to our .bashrc that we want wayland compositor
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
+
+@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{/bin/gtkgreet} command.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
+
+@end table
+@end deftp
+
 @deftp {Data Type} greetd-wlgreet-color
 
 @table @asis
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4105da6c05..05c0a1a4e9 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -276,6 +276,7 @@ (define-module (gnu services base)
             greetd-terminal-configuration
             greetd-user-session
             greetd-agreety-session
+            greetd-gtkgreet-sway-session
             greetd-wlgreet-color
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
@@ -3470,6 +3471,36 @@ (define (make-greetd-sway-greeter-command sway sway-config)
            (dup2 1 2)
            (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-wlgreet-color>
   greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
   (red greetd-wlgreet-color-red)
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:58:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:58:56 2025
Received: from localhost ([127.0.0.1]:56925 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU7UF-00020O-Iz
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:55 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52334)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tU7UD-0001zv-2x
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:53 -0500
Received: from localhost ([127.0.0.1]:54850)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tU7QP-0001ur-0R
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 16:54:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=aHV3NrbvVK494E4Q5K0ZNqGOtCLeSfPqwauGgUoJPVA=; b=vct8al+CySzgTcrWvlnzJs8yCU
 NCW/lmBUV16DjfF3ZGa65knzWAm18m9S1IawVn7ohBZtU5cext6vkywfGM2DeBmqtEK0oVVJD+oza
 Cke/uoAwxZKnM1aoFAQIh+d0sJsIYjiuI2NPfBXdAWwUHBc/r+yFx8Ns3R8HWLv/SWVdU61qR3ZPe
 jyupxoSiqx92JMOUgk1Aeq/tWwnYYgR8sesP7LraouGgyjxIzq3s8aso0D3B/j+mtAEoNDwZ79uJJ
 6hXrtPIpReEOZxE4sxTMzm8nRJskIs2Q5CtXShNK/RF7PVZMCYLJT4GfBGj3vU8Yo9QSGcZ6szIkS
 RkCnnv8HRVyxevsrzHLrOWJT4BR/KVvc/9MjtUJt7HVw52G/uyNEg/8Nv4froSYVoxKfzwy09QqHy
 1x8+Rv19rQOfLC9uqwmKnwFeCZWL9S2Mqd7XdiXIkrQnR43hkfJmOorijcoRz+pG9j65PLWeijSZk
 bXA6nH0YSefj4u9lWPechgch;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tU7U6-000000003VC-3RZR
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 19:58:46 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v2 2/3] gnu: Add gtkgreet.
Date: Sat,  4 Jan 2025 19:58:42 +0300
Message-ID: <8b80a71b3b698aebbe85c1b8cfc8c9ea38ec5ce5.1736009605.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1736009605.git.mail@HIDDEN>
References: <cover.1736009605.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.

Change-Id: I364dff198e0a01c88f5172416fb42cb410dbe48f
---
 gnu/packages/admin.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 466df65dd9..a0e2ce7123 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2024 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -5831,6 +5831,29 @@ (define-public wlgreet
 on a GUI toolkit.")
       (license license:gpl3))))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:58:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:58:55 2025
Received: from localhost ([127.0.0.1]:56923 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU7UF-00020M-9Z
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:55 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:52314)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tU7UC-0001zr-1N
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:58:53 -0500
Received: from localhost ([127.0.0.1]:54832)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tU7QN-0001ul-20
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 16:54:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:
 From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=43OuvWK7AeS+EOpVKzQ4Dw7T4pw1xlx7d9EWuUSgrxQ=; b=trdKth077VJgB4Fer/clAUZmUc
 FlkhmAxOdQZQWzyx3RKxoYdizrcHSXIx7rT6weKV+XsDeoQZWTftP//MEm40PbQyvx0f3Pp44Dkzs
 AYvPqMvuRJSW0aGzQccWk3Md4O3aCLflycebZy+A16SHH4a9VLQgAlTdwnoHrW3vvgZqjn8fpQOkd
 ILgPB6vuhWa0r/ygHWFWTmYSzgxbgaNFHXkmguoL+E6Pxr3GSRBjkwRPTYhCD26osUQ7zrt4RYjjf
 sOsXmO3jAD0IooGJ3UfbRoiSLROpnGbR9RHJ4b2fn4wLTEJdeGV1IPTS3oeMUxa+w2XCMOu7+neXE
 N8hdTTefokEV2j0CWQtDKgegYtk+HVtTYTKob2xKbG7/tlGGWjxq02rHrAIE/bkQjxWUtKU3zuHvZ
 9/+IOH1tqMWkcb7DFSO3vdDDg1nTJsuu4jYQBguHVGZv3zla5P2tcOSW6bqKxGEcgSlkzBUGyZygu
 6mno03tyz+0UCxTVoAlLOZR3;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tU7U5-000000003Ue-0PZu
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 19:58:45 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH v2 0/3] services: greetd: Improve greeter configurations.
Date: Sat,  4 Jan 2025 19:58:40 +0300
Message-ID: <cover.1736009605.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

Improves greeter configuration and adds new gtkgreet greeter.
This will solve 64112, 65769 and 70605.
This will obsolete 70318.

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 153 +++++++++++++++-----
 gnu/packages/admin.scm |  25 +++-
 gnu/services/base.scm  | 307 ++++++++++++++++++++++++-----------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 333 insertions(+), 166 deletions(-)


base-commit: 321edcf0744a8895690579e8a5b09b66c75d102c
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:14:41 2025
Received: from localhost ([127.0.0.1]:56835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU6nR-0008O5-Dm
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:14:41 -0500
Received: from 4.mo575.mail-out.ovh.net ([46.105.59.63]:43525)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ngraves@HIDDEN>)
 id 1tU6nM-0008Ng-00
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:14:39 -0500
Received: from director3.ghost.mail-out.ovh.net (unknown [10.108.9.253])
 by mo575.mail-out.ovh.net (Postfix) with ESMTP id 4YQQWF6mVJz1qJh
 for <75270 <at> debbugs.gnu.org>; Sat,  4 Jan 2025 16:14:33 +0000 (UTC)
Received: from ghost-submission-5b5ff79f4f-gmlr4 (unknown [10.110.96.9])
 by director3.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A86EE1FE0F
 for <75270 <at> debbugs.gnu.org>; Sat,  4 Jan 2025 16:14:33 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.103])
 by ghost-submission-5b5ff79f4f-gmlr4 with ESMTPSA
 id gATzHGleeWeFpQUAVUMmmA (envelope-from <ngraves@HIDDEN>)
 for <75270 <at> debbugs.gnu.org>; Sat, 04 Jan 2025 16:14:33 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-103G00541eeb5b2-440d-4428-bdc6-4bc404369e22,
 F889032F872897E4ADBBAB68386FDDABF33E490D) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.92.117.144
From: Nicolas Graves <ngraves@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: Fwd: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
References: <87jzbar8oa.fsf@HIDDEN>
Date: Sat, 04 Jan 2025 17:14:32 +0100
Message-ID: <87a5c61rpz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Ovh-Tracer-Id: 6802968715086586433
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrudefiedgkeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufhffkfggtgesmhdtreertddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvudevtdeggfelffektdegleelffejkeefgeegkedtudeliefflefhudeghfegteenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggedpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeehvdejtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejhegmpdhmohguvgepshhmthhpohhuth
DKIM-Signature: a=rsa-sha256; bh=KivnzW+Kqd2hKimK1F52TE1f8q0FcvUrd+E7fAcmCmw=; 
 c=relaxed/relaxed; d=ngraves.fr; h=From;
 s=ovhmo4487190-selector1; t=1736007274; v=1;
 b=sR0CW0Aw+TK0MAAA3IDrJLqIZdxKPsAKxqaPssfK0jMnz4JLlt94i+nbbEn42mRmJQYVYUNW
 KM52ak7daUZllOtNz0lU9RJjqwEdFnJQgrwHFFzSbcQJoVBjJ3eLYJiSxaLJaj7OYvjWCi4d5B6
 WmCgJXfMuBMsUx/B6J+jlxVS0g+eFkk6nhYVb+0J5LMC3Xqm+bBUKjdSpAw/IJ9lfgdH2g1p8zl
 zEc6esVbp2OleOE4uUVvKQz1SBLg4/iM1UmHk7nyARST0vseKCOQlxY/sLSdcE73y7A89Z7mWq6
 Wis5eajCOskPUmI8RQQ/ei6cpBs1jhDqtG4CTEUWVrvQQ==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

--=-=-=
Content-Type: text/plain


-------------------- Start of forwarded message --------------------
From: muradm <mail@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
Date: Sat, 04 Jan 2025 16:49:09 +0300


--=-=-=
Content-Type: multipart/signed; boundary="==-=-="

--==-=-=
Content-Type: text/plain; format=flowed
Content-Disposition: inline

Nicolas Graves <ngraves@HIDDEN> writes:

> On 2025-01-04 11:57, Nicolas Graves wrote:
>
>>> When you start sway, it has to put WAYLAND_DISPLAY somewhere. 
>>> By
>>> default it is put to `/run/user/<uid>`. However greeter is 
>>> special
>>> limited user which is used to run without logging in. Because 
>>> of
>>> that, `/run/user/<uid>` is not created by PAM mount. For 
>>> special
>>> purpose we can use any XDG_RUNTIME_DIR. Sway does not support
>>> specifying location of WAYLAND_DISPLAY as far as I remember (I 
>>> was
>>> opening an issue about it long ago, still was not resolved).
>>
>> IIUC, it's because of PAM mount execution order that this 
>> happens?  So
>> there's also no need for that for people that don't use PAM 
>> mount.
>> Maybe completing the comment as "/run/user/<greeter-user-uid> 
>> won't
>> exist yet due to PAM mount execution order" comment would make 
>> that
>> clearer?
>>
>> Is the logfile here the one logging everything Sway?  Could you 
>> make the
>> logfile configurable or is that not possible due to 
>> unguaranteed dir
>> existence due to PAM mount?  We are making an extra effort to 
>> locate
>> logfiles in the same dir in RDE. (I could also try and make a 
>> symlink a
>> posteriori to the right dir).
>
> Actually, I'm not sure I understand properly.
>
> I use agreety, then sway through ~/.profile because default is 
> bash
> --login.

This is most straightforward and IMHO correct way to start 
whatever user wants.

> It works OK, because the user (not greetd) launches Sway.
> Should I care about your changes ?

No, you should not care about stuff happening in script in 
`make-greetd-sway-greeter-command`. User session is started by 
scripts within `make-greetd-user-session-command` and 
`make-greetd-xdg-user-session-command`. Where user session command 
is specified by `command`, `command-args` and `extra-env` in 
`<greetd-user-session>`.

Most notable impact of this change, as noted in cover letter is 
that user session now factored out. Now you are able to pass 
instance of `<greetd-user-session>` to any properly defined 
greeter, which are agreety, wlgreet and gtkgreet as of this 
change.

I'm not RDE or guix home user, but I suppose that their entry 
point should be an instance of `<greetd-user-session>` or 
combination of greeter and `<greetd-user-session>`.

> If I want to skip this bash step and make greetd launch sway 
> directly,
> then I would need this script, otherwise, it is not necessary, 
> am I
> right?  Is there any upside / reason I should switch?

Technically, you may set `command`, `command-args` and `extra-env` 
to sway, its required arguments and if necessary environment 
variables of `<greetd-user-session>` instance, carefully 
considering `xdg-env?` and `xdg-session-type`. But, as I mentioned 
above, IMHO and from my experience, starting from 
.bashrc/.profile/whatever from user home and editable by user is 
more correct and straightforward.

--==-=-=
Content-Type: application/pgp-signature; name=signature.asc
Content-Transfer-Encoding: base64

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVTUFk1bG1hOUE5
bDVIR0xQNk03TzBtTE9CZUlGQW1kNVBGVUFDZ2tRNk03TzBtTE8KQmVLRjVCQUExZW5mZGFFUEJN
SSszaHNrMGFuSGFCVGFtdm1vNzNKRk9xMTZPRlJ6dWk5UHBaTmFDQUlabkZvOAozdnducE91NGtE
WkVQRGcwcjhiYUJaNTRjOTJrOG5TQ1UzVEJkTUJaM3E2MktZc3NkS3MrSUUrVkxrV2tYYmFmCmFS
b3poeDFnRks1bHlNamxiWGh4bDBMZ0xQN3Nja3U1Qm10U0RubTU5WXVkTk9VZTdHd3lhV1RCRXRD
UG9nRkQKRnlTUjY1TktPVlg3eFNGNWJKYnUrMlVYcTV2WFgyT0didjZSa1J5MjBnU0pOZENXMFJ4
OUg0L3cwNmwrYVVzQgpENHpxcTFHT0VHMFlhb0taZkNidlYvZnF3Z0Q3UDdja29kcHJTOGpaTWFr
eCtBa0djMDBjaHJlTTZ2M0tOWlJDCnFHTzB3TXpXNWVOUWJUNnpRUHNKVUd6Mm1sOWRTbWppdCtT
TXV0eEJ5dzZTdFNTR3dSaktodHFmMWNRMXkvVjgKUUVBT0drekR6VlVaSFp3VWwrMTNobzcxUWkw
eGMyYmdXOHFValljaEFFQ25ZbStLY1E2OWkwOEE1dzRTZThEWApMVmhsM1hVUUVIR2ZVZmZ6dytM
TURaVEpUYjN0VUFhS1ZrMlhZYTZTNDNuME5lZFhYeVFQN1Fjc2JYSnVGeFl5CkdMZ044YjlXN1RE
Q3ozMUdiMVY2ajZLUW1QWWpoeUNBcTZ1OG9PdHVxd1FXTW50T2dudHh5U2NMeWl5UUVkVWgKbTEy
cmp6R2lLTWF6cEF4THl2Z2cycHphdTFQRVF2RXV3NGFLaGFIREE5eXk3L2lmbDVyZWZITEIxUlhO
YkI4dQpKbi92aG1IMVkwclo5RkJRQU5Ba1JVb3VVVG1FWHg3bDI3VkRSVUl0Rk1OSDAwK0JEZ0U9
Cj1OOVhoCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ==
--==-=-=--

--=-=-=
Content-Type: text/plain

-------------------- End of forwarded message --------------------

-- 
Best regards,
Nicolas Graves

--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 13:36:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 08:36:50 2025
Received: from localhost ([127.0.0.1]:53932 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU4Kf-0008WA-M9
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 08:36:50 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:49762)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tU4Kc-0008Vv-V4
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 08:36:48 -0500
Received: from localhost ([127.0.0.1]:41692)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tU4Gi-0001pF-0C;
 Sat, 04 Jan 2025 13:32:44 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=qiWLOgo6LlyUX/lSDjIAg4RFkb3KgX1JCFuUN3dye54=; b=Pq+tIGgU/a41E3ZKFEKt2IkUz3
 OHziJTQWc2BnTsSDCvbnQWEPCedgE4z8LPq2LVNpIbm9iL4JjpFOURsC/lfE7toMZY7viFVSiF1lo
 9+1QL4+NC1jsYfsEF2yVRRB3r3OZdzrM9oMjb+crMJyxUuQ/BPph24inKNWw73h7jkExVqH7Rp3Hw
 2GMUCDOmFI7Egy5jEOmv63B+chirxFYUf8MOxgXnvBGm7xYSJmV8zn/NDi8GOY++bUAg9TRN9DyoC
 4b3Yr2H7B2zzNOc9bL9lvf6k3aOVOzAk5jvTxGE/ibqd/pOitLyUsGTtw8kcCOVdkb5raE4OiZvKk
 2PyGHjpdofvxTcrkX4yschNzDVdnGLEAsocN0aNiL+1vX+RG2z8lxHsgfYQQyFvWhcHrbzDfsIKIm
 eRjsp7FsBGA7qwxQhpbWRyI7ev6XFkmMvYCTbbTN1QgTUVhDjGPaco4dfze7xXqzliR9lTNgq/KSa
 efkuJNuhjMdPEXzcRzGsWFep;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tU4KM-000000007gp-241d;
 Sat, 04 Jan 2025 16:36:30 +0300
From: muradm <mail@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87zfk6zw0t.fsf@HIDDEN> (Nicolas Graves's message of "Sat, 04
 Jan 2025 11:57:38 +0100")
References: <cover.1735771462.git.mail@HIDDEN>
 <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
 <87pll4owui.fsf@HIDDEN> <87ed1j6d0l.fsf@HIDDEN>
 <87zfk6zw0t.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Sat, 04 Jan 2025 16:36:30 +0300
Message-ID: <87pll2r99d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed

Nicolas Graves <ngraves@HIDDEN> writes:

> On 2025-01-03 20:08, muradm wrote:
>
>> Nicolas Graves <ngraves@HIDDEN> writes:
>>
>>> On 2025-01-02 01:53, muradm wrote:
>>>
>>>> This improvement focuses on providing common user session
>>>> scripts
>>>> for use by multiple greeters. It also fixes incorrect use of
>>>> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires 
>>>> compositor
>>>> to
>>>> run. We provide common sway based greeter script, which can 
>>>> be
>>>> shared by other graphical greeters.
>>>
>>> [...]
>>>
>>>> +(define (make-greetd-sway-greeter-command sway sway-config)
>>>> +  (let ((sway-bin (file-append sway "/bin/sway")))
>>>> +    (program-file
>>>> +     "greeter-sway-command"
>>>> +     #~(begin
>>>> +         (let* ((username (getenv "USER"))
>>>> +                (useruid (passwd:uid (getpwuid username)))
>>>> +                (useruid (number->string useruid))
>>>> +                ;; /run/user/<greeter-user-uid> won't exist
>>>> yet
>>>> +                ;; this will contain WAYLAND_DISPLAY socket
>>>> file
>>>> +                ;; and log-file below
>>>> +                (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
>>>> +                (log-file (string-append (number->string
>>>> (getpid)) ".log"))
>>>> +                (log-file (string-append 
>>>> user-xdg-runtime-dir
>>>> "/"
>>>> log-file)))
>>>
>>> Could you explain why this is necessary?  If I'm not mistaken,
>>> we didn't
>>> used a special runtime dir in RDE, and it worked OK.
>>>
>>
>> When you start sway, it has to put WAYLAND_DISPLAY somewhere. 
>> By
>> default it is put to `/run/user/<uid>`. However greeter is 
>> special
>> limited user which is used to run without logging in. Because 
>> of
>> that, `/run/user/<uid>` is not created by PAM mount. For 
>> special
>> purpose we can use any XDG_RUNTIME_DIR. Sway does not support
>> specifying location of WAYLAND_DISPLAY as far as I remember (I 
>> was
>> opening an issue about it long ago, still was not resolved).
>
> IIUC, it's because of PAM mount execution order that this 
> happens?  So
> there's also no need for that for people that don't use PAM 
> mount.
> Maybe completing the comment as "/run/user/<greeter-user-uid> 
> won't
> exist yet due to PAM mount execution order" comment would make 
> that
> clearer?

No, that is not about order, but the fact that when greeter is 
running it is not a "login action" to carry out PAM stuff. PAM 
mount normally runs after user successfully passing authentication 
with username and password. Greeter runs 
agreet/wlgreet/gtkgreet/whatever before that.

> Is the logfile here the one logging everything Sway?  Could you 
> make the
> logfile configurable or is that not possible due to unguaranteed 
> dir
> existence due to PAM mount?  We are making an extra effort to 
> locate
> logfiles in the same dir in RDE. (I could also try and make a 
> symlink a
> posteriori to the right dir).

That log file write stdout and stderr of greeter process, not the 
user. At the time user passes successfull authentication, greeter 
process exists, this log file completes its job. The user session 
is started by greetd in different environment unrelated to 
greeter's environment.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmd5OV4ACgkQ6M7O0mLO
BeIuBw/8CO4GhsnYSq+YI+e+yMN5J2sEP0PFchixWAj/sq+EfR8mMZEbrlpNoTej
Onw6mP0CAIFqySvFLpE79U6tMqDjxm8Lt+tAYi5rXV+AQCMhPdOoatEN+ET0QXb1
EUvUbghtC2crFjC/y+zxwtuLIqV8B2o9nuecHwhm+/0EIcQD0viiSAeEgv+hZ2p8
v1YNcY5mRSv0amh9u8lgsZTKF2us/UQXECwrC8bS1A4nymSCv/1isGcsK1g9Scha
6byTuNY4up9NiVzR8XqCbbJcPIVVyFeurq27Zc2NDugddgPE6VxpPsWOPdZt/8EQ
toDsKYj7Iim9Ve80Am2ZEzjLxlbQakwwuKnc+bajQ98CSXReYj6IuG/o5ChcO+op
QiXSs+mbP2O8+J2jl5SLU+I8bTaE3LOGwv1U/R038yWQln8Ok3BLIrzWqyq5YYYp
dza/ojaRYprxVWe8+9+fJlPHDs8gbw1TdyKSW4ZgnOYTRAVFR2MGD+iv7U8D9dM0
xYoGLnb5UXy/3V/TSVvQ1heCDG3RpEFAYhJkCasopMQkOUr6wNS4lUAlwNqBNvW1
/4/301DyzEleKh6DdDfMoHsBe/xcg3Seosjsrzb6I2aWrSDT1UYHmY4Y2DVJWjF6
53IW/CuWQjQUNRWEYAp1FZImj0NMXShia6FFVFFsH6X93FHnEsw=
=LgFu
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 10:57:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 05:57:46 2025
Received: from localhost ([127.0.0.1]:53512 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU1qk-0000wU-6W
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 05:57:46 -0500
Received: from 14.mo561.mail-out.ovh.net ([188.165.43.98]:45833)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ngraves@HIDDEN>)
 id 1tU1qg-0000wI-Ab
 for 75270 <at> debbugs.gnu.org; Sat, 04 Jan 2025 05:57:44 -0500
Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.140.34])
 by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4YQHTc4MmBz1PLV
 for <75270 <at> debbugs.gnu.org>; Sat,  4 Jan 2025 10:57:40 +0000 (UTC)
Received: from ghost-submission-5b5ff79f4f-h5bxl (unknown [10.111.182.10])
 by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 6B5001FD95;
 Sat,  4 Jan 2025 10:57:39 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.98])
 by ghost-submission-5b5ff79f4f-h5bxl with ESMTPSA
 id oTxfByMUeWenrgMAXukBPQ
 (envelope-from <ngraves@HIDDEN>); Sat, 04 Jan 2025 10:57:39 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-98R002ff058f59-6186-42b0-a381-510f101d0728,
 F889032F872897E4ADBBAB68386FDDABF33E490D) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.92.117.144
From: Nicolas Graves <ngraves@HIDDEN>
To: muradm <mail@HIDDEN>
Subject: Re: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87ed1j6d0l.fsf@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
 <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
 <87pll4owui.fsf@HIDDEN> <87ed1j6d0l.fsf@HIDDEN>
Date: Sat, 04 Jan 2025 11:57:38 +0100
Message-ID: <87zfk6zw0t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 1451284984132002497
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrudefiedgvddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegpdefjedrheelrddugedvrdelkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjeehvdejtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeiudgmpdhmohguvgepshhmthhpohhuth
DKIM-Signature: a=rsa-sha256; bh=irUkQx8AH/aJHgtG24blNzStJ0PeVdNa/pqmovqSG5E=; 
 c=relaxed/relaxed; d=ngraves.fr; h=From;
 s=ovhmo4487190-selector1; t=1735988260; v=1;
 b=M1+Zra/CzuI+xaEMulU0tsJ1Y+jT6WYSokUM5Aml2bNm24mBsgGiFr+xR0dusjWRBXENE+bv
 UWYwFyQVxklnJDpiHCjQtcS5PsfMJ9hNXstYWesKTeBIJ4Nzr/zjLi/eXMXrUSpil0BfJnUcUzZ
 Za1K0O8+nQowRxRBv5p0kpcy0RpDise4NtRH4we7uhHh9M7Q6p6glUWZkFaOBGezR5fz66CobxV
 dKXnFOJEj2hnmYbiQLJxHwPZy0Dv3FY6HdRd0NQSyO6niDFB6QrUzCmSNlFGLOHkp3T9EqQufF5
 p9Y4AGMWJlgZz9ZhPCE76jCvbtpqUsCi4e+aXiWjOLDeg==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

On 2025-01-03 20:08, muradm wrote:

> Nicolas Graves <ngraves@HIDDEN> writes:
>
>> On 2025-01-02 01:53, muradm wrote:
>>
>>> This improvement focuses on providing common user session 
>>> scripts
>>> for use by multiple greeters. It also fixes incorrect use of
>>> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires compositor 
>>> to
>>> run. We provide common sway based greeter script, which can be
>>> shared by other graphical greeters.
>>
>> [...]
>>
>>> +(define (make-greetd-sway-greeter-command sway sway-config)
>>> +  (let ((sway-bin (file-append sway "/bin/sway")))
>>> +    (program-file
>>> +     "greeter-sway-command"
>>> +     #~(begin
>>> +         (let* ((username (getenv "USER"))
>>> +                (useruid (passwd:uid (getpwuid username)))
>>> +                (useruid (number->string useruid))
>>> +                ;; /run/user/<greeter-user-uid> won't exist 
>>> yet
>>> +                ;; this will contain WAYLAND_DISPLAY socket 
>>> file
>>> +                ;; and log-file below
>>> +                (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
>>> +                (log-file (string-append (number->string 
>>> (getpid)) ".log"))
>>> +                (log-file (string-append user-xdg-runtime-dir 
>>> "/"
>>> log-file)))
>>
>> Could you explain why this is necessary?  If I'm not mistaken, 
>> we didn't
>> used a special runtime dir in RDE, and it worked OK.
>>
>
> When you start sway, it has to put WAYLAND_DISPLAY somewhere. By 
> default it is put to `/run/user/<uid>`. However greeter is special 
> limited user which is used to run without logging in. Because of 
> that, `/run/user/<uid>` is not created by PAM mount. For special 
> purpose we can use any XDG_RUNTIME_DIR. Sway does not support 
> specifying location of WAYLAND_DISPLAY as far as I remember (I was 
> opening an issue about it long ago, still was not resolved).

IIUC, it's because of PAM mount execution order that this happens?  So
there's also no need for that for people that don't use PAM mount.
Maybe completing the comment as "/run/user/<greeter-user-uid> won't
exist yet due to PAM mount execution order" comment would make that
clearer?

Is the logfile here the one logging everything Sway?  Could you make the
logfile configurable or is that not possible due to unguaranteed dir
existence due to PAM mount?  We are making an extra effort to locate
logfiles in the same dir in RDE. (I could also try and make a symlink a
posteriori to the right dir).

-- 
Best regards,
Nicolas Graves




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

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


Received: (at 75270) by debbugs.gnu.org; 3 Jan 2025 17:08:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 03 12:08:56 2025
Received: from localhost ([127.0.0.1]:51875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTlAN-0003Ea-UM
	for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 12:08:56 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:38306)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tTlAJ-0003EF-LB
 for 75270 <at> debbugs.gnu.org; Fri, 03 Jan 2025 12:08:53 -0500
Received: from localhost ([127.0.0.1]:40788)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tTl6V-0001Ge-3A;
 Fri, 03 Jan 2025 17:04:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=D+GhY1McjJviJkf/cOF40K8c4Xn4PRer89TG5Ree0W4=; b=nunyvsKGwSFhGP6iiHQeLPg3sl
 ZSg4L1g+eDTKl5ualKbsBbCUG9p2T7jKkpLiPIZuwIvVmlUHvgmnz1usok1d4LelOZ4SD7L0JREt8
 l2LahjOOk/nkjCchUHKFcAqHasGbAFenlnW028zwy4vp0D0sHPl7f8/gFpAy0DHZcRaEFgXIIjLDR
 rZlkdUMhnr7WNTcR599axlYIPt1xKZ4nWyxVZAjcgcmC3FgzLF3hvwa8N9Gp200Z0DaOgP0/NbFfk
 6ioALL4iLj8oqQx6MeF8ENLkQQsz1RNHVkg8fFWtnffXsJMp/ghAGJ8trhYtTJIZRso1Oq83HewuC
 NInOeGDzxv8K7IyaoTRZc7GMh6oEKLpQwMSWlIMukTXPejUtQAEPVXHDp4UJtlr0+AYkzJGksCGvI
 YEYPXzLZ2frdrohpybJ3hUgGHAB4ZjkZShU3UBj8LtpmNpqJdvUGh4947RpG6xLKAY6TEJ1WAEiGc
 C8xPiSwFYCHAfbfibmKrDlIW;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tTlAA-000000006gU-1jbU;
 Fri, 03 Jan 2025 20:08:42 +0300
From: muradm <mail@HIDDEN>
To: Nicolas Graves <ngraves@HIDDEN>
Subject: Re: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <87pll4owui.fsf@HIDDEN> (Nicolas Graves's message of "Fri, 03
 Jan 2025 14:23:01 +0100")
References: <cover.1735771462.git.mail@HIDDEN>
 <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
 <87pll4owui.fsf@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Fri, 03 Jan 2025 20:08:42 +0300
Message-ID: <87ed1j6d0l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 75270 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


Nicolas Graves <ngraves@HIDDEN> writes:

> On 2025-01-02 01:53, muradm wrote:
>
>> This improvement focuses on providing common user session 
>> scripts
>> for use by multiple greeters. It also fixes incorrect use of
>> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires compositor 
>> to
>> run. We provide common sway based greeter script, which can be
>> shared by other graphical greeters.
>
> [...]
>
>> +(define (make-greetd-sway-greeter-command sway sway-config)
>> +  (let ((sway-bin (file-append sway "/bin/sway")))
>> +    (program-file
>> +     "greeter-sway-command"
>> +     #~(begin
>> +         (let* ((username (getenv "USER"))
>> +                (useruid (passwd:uid (getpwuid username)))
>> +                (useruid (number->string useruid))
>> +                ;; /run/user/<greeter-user-uid> won't exist 
>> yet
>> +                ;; this will contain WAYLAND_DISPLAY socket 
>> file
>> +                ;; and log-file below
>> +                (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
>> +                (log-file (string-append (number->string 
>> (getpid)) ".log"))
>> +                (log-file (string-append user-xdg-runtime-dir 
>> "/"
>> log-file)))
>
> Could you explain why this is necessary?  If I'm not mistaken, 
> we didn't
> used a special runtime dir in RDE, and it worked OK.
>

When you start sway, it has to put WAYLAND_DISPLAY somewhere. By 
default it is put to `/run/user/<uid>`. However greeter is special 
limited user which is used to run without logging in. Because of 
that, `/run/user/<uid>` is not created by PAM mount. For special 
purpose we can use any XDG_RUNTIME_DIR. Sway does not support 
specifying location of WAYLAND_DISPLAY as far as I remember (I was 
opening an issue about it long ago, still was not resolved).

>> +           (mkdir user-xdg-runtime-dir #o700)
>> +           (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
>> +           (sleep 1) ;; give time to elogind or seatd
>> +           (dup2
>> +            (open-fdes
>> +             log-file
>> +             (logior O_CREAT O_WRONLY O_APPEND)
>> +             #o640)
>> +            1)
>> +           (dup2 1 2)
>
> Maybe also here a tiny comment on why this is better than the 
> previous
> fileno approach.
>

dup2 takes file descriptor, open-fdes provides in one go. 
Otherwise technically it does not matter how you acquire file 
descriptor. This script I created long ago for greeters. This is 
my recent version.

>> +           (execl #$sway-bin #$sway-bin "-d" "-c" 
>> #$sway-config))))))
>
> Also, what about the XDG_CURRENT_DESKTOP setting? Should it not 
> be added
> with xdg-env too?

You don't need it, to run single sway process with single greeter 
application. Keep in mind that there is an "environment" to run 
greeter, and another "envrionment" for user after the login. They 
do not overlap. If you need XDG_CURRENT_DESKTOP for user after 
login, it could be set by window manager, desktop environment, 
manually in profile or manually in `extra-env` of 
`greetd-user-session`.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmd4GZoACgkQ6M7O0mLO
BeJUbA/+OHhZQ4PMvGt59Wr5AFuFJrsPV48ei25m8ZX2bv1K8GHrR2ZzSGicb7o2
1h8vYVZpBRlQzVgTtgaVFvlaJuNbcBgdVSziPtxHQO900J3iQZAEHT158PQjrs6j
EBjcS5kBSl2zebasYoxi+P6dVlPana/xhS9MLv3k391Ksyy24jVYzAJh/I4uS9R+
7RpQsHUWn6xmuh/Pr04Nkg+MChLfK5oSrbOR/fKah2a5tZQRhpQLq7weeC0juP8k
QzIhPH1WP43i3nA5CmQFEC3849NNXFyodE1k8QovKWgZhRP2FEllibVMf3sUOz42
6WHZxXuyJOZvfX0trjaMomy5uJDJKjZEqdoROCqn/4bnYozRuL7Xe2R8hwh26PII
TApohuu0JUDl+c1TcVDF1qDqth7uyEqDhE9Xc2gLgi9bplQi8cn4CNGR84HlVOIy
KZeEf2kkqM+Vq6EeAEElHwB2N84/mJPJ/dVhipD4R+lYdzfEMAEEhevWmyZqUNfE
d77lu20pa5N2MRpRkRDgyvYYywIsU8viFRzC0S9+GR5PT7hluDaYSydjVV9BbfOt
k36wU8+yhl3P/17S2g4XZ0b5CsLVdifOp4l8jCm4N6aa+vlAAOocIJZMUpxRI6DG
QYptdzen2I9/TPZ5AXi4y1SxRhQRMHfN60fRgFW1jbf5bj70l9I=
=SoxH
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 3 Jan 2025 13:23:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 03 08:23:08 2025
Received: from localhost ([127.0.0.1]:50011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tThds-00070v-Jc
	for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 08:23:08 -0500
Received: from 17.mo582.mail-out.ovh.net ([46.105.36.150]:37149)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ngraves@HIDDEN>)
 id 1tThdp-00070k-5S
 for 75270 <at> debbugs.gnu.org; Fri, 03 Jan 2025 08:23:06 -0500
Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.2.211])
 by mo582.mail-out.ovh.net (Postfix) with ESMTP id 4YPklp70DHz1QjK
 for <75270 <at> debbugs.gnu.org>; Fri,  3 Jan 2025 13:23:02 +0000 (UTC)
Received: from ghost-submission-5b5ff79f4f-49x8b (unknown [10.110.101.173])
 by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D7A141FE87;
 Fri,  3 Jan 2025 13:23:01 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.112])
 by ghost-submission-5b5ff79f4f-49x8b with ESMTPSA
 id pq3qKbXkd2eBJQIAlji3/w
 (envelope-from <ngraves@HIDDEN>); Fri, 03 Jan 2025 13:23:01 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-112S006948f0df7-c1b0-4c4e-af9d-f2ea702c6d85,
 FB727D49AD2A97A316BA0614592CE7875B345261) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.92.117.144
From: Nicolas Graves <ngraves@HIDDEN>
To: muradm <mail@HIDDEN>, 75270 <at> debbugs.gnu.org
Subject: Re: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
 <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
Date: Fri, 03 Jan 2025 14:23:01 +0100
Message-ID: <87pll4owui.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Ovh-Tracer-Id: 16480359886886200001
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: -100
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrudefgedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegpdefjedrheelrddugedvrdduuddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejhedvjedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedvmgdpmhhouggvpehsmhhtphhouhht
DKIM-Signature: a=rsa-sha256; bh=x5CYmNcxiAqTBgZ15WbTSdu/wg90+aJuPF8kmAA5740=; 
 c=relaxed/relaxed; d=ngraves.fr; h=From;
 s=ovhmo4487190-selector1; t=1735910583; v=1;
 b=cDlxnuODHD9y10xkCCKMEiclv0AAhJhV4HCdrhRBRv/KkfT2Ki/i9P1K+TlYtRT3kyzlaOAK
 /rnt86pXaa3FSG+eG6sNwLI2igjNtI6l74JEkdNqpnJRK9Yvb11y1GiJ0WAqkQVxOTFq+S+TbqK
 i1yK+D7FkWDkMwURlo4wnDiA2FRiXV0Vgj59lMyw833/AIWTwYFePdAVEAKM/gYve8nCACrYmWy
 XgpP1KjK6Jne/A+aCHkgDCjr4FWkP5EE+mmFbATltd0tGYxbuSC+Fan7dAv6hbACdJ6GndDmReh
 MJQ/W9B2WFakKSCQfFigb8L9+Ma3gpVf22Pmvkp/2SaOw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@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.0 (-)

On 2025-01-02 01:53, muradm wrote:

> This improvement focuses on providing common user session scripts
> for use by multiple greeters. It also fixes incorrect use of
> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires compositor to
> run. We provide common sway based greeter script, which can be
> shared by other graphical greeters.

[...]

> +(define (make-greetd-sway-greeter-command sway sway-config)
> +  (let ((sway-bin (file-append sway "/bin/sway")))
> +    (program-file
> +     "greeter-sway-command"
> +     #~(begin
> +         (let* ((username (getenv "USER"))
> +                (useruid (passwd:uid (getpwuid username)))
> +                (useruid (number->string useruid))
> +                ;; /run/user/<greeter-user-uid> won't exist yet
> +                ;; this will contain WAYLAND_DISPLAY socket file
> +                ;; and log-file below
> +                (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
> +                (log-file (string-append (number->string (getpid)) ".log"))
> +                (log-file (string-append user-xdg-runtime-dir "/"
> log-file)))

Could you explain why this is necessary?  If I'm not mistaken, we didn't
used a special runtime dir in RDE, and it worked OK.

> +           (mkdir user-xdg-runtime-dir #o700)
> +           (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
> +           (sleep 1) ;; give time to elogind or seatd
> +           (dup2
> +            (open-fdes
> +             log-file
> +             (logior O_CREAT O_WRONLY O_APPEND)
> +             #o640)
> +            1)
> +           (dup2 1 2)

Maybe also here a tiny comment on why this is better than the previous
fileno approach.

> +           (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))

Also, what about the XDG_CURRENT_DESKTOP setting? Should it not be added
with xdg-env too?

-- 
Best regards,
Nicolas Graves




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

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


Received: (at 75270) by debbugs.gnu.org; 3 Jan 2025 11:34:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 03 06:34:35 2025
Received: from localhost ([127.0.0.1]:49795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTfwo-0001zE-OU
	for submit <at> debbugs.gnu.org; Fri, 03 Jan 2025 06:34:35 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:38422)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tTfwm-0001yz-Ll
 for 75270 <at> debbugs.gnu.org; Fri, 03 Jan 2025 06:34:33 -0500
Received: from localhost ([127.0.0.1]:35650)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tTfsy-00016T-2V;
 Fri, 03 Jan 2025 11:30:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:
 Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=C1EX16HY21X2qFAdvQPL+gHHd0SqAy45KxnGj5DgB+M=; b=SpipATk/R2Eq0hYCNHLUOKap7t
 YbAI6AQIOiN+xBbaLnaQ+c7bjIHJR4qffnuV/vgA3F5ZrGCjSPmzckRIw27pbn9yDsAfnmLSIJiOT
 /oSEXkSpiyUTja/MLFoLyq2oA6JiTCU/pGZw8Wt0/b2Lm3PWM9J4qdmHqJ77jLpk/VnSSPZlGjEPC
 65GlPpmqvG65JzV++2eWHtjTC+d19RUeBmBdAqzJYuPJCmUkvzxttqBwOdyYKi3uE8x5pigXWKu28
 zVuepfo9ZQupOYGgGUM8Sv4YtFpVYwoShlpxItg722OYUF4MSyMi2mEyA9nmWc9VREnYaZLy5YnDk
 U/av29xOMBhoUvqof3jVt461c4IzSeugidxyTG19vnhZx8dn0o164D3z4+qGiOYShXGNpVaRO3f1x
 nNuEIKBz8876Dg2qr0FJ2stGA34CJyXh09lLUKNjbIBubSvadJxmm3mKBfdoZhDn9u0t2jao6I2l5
 RXWOXR3H2CvSNfzdtt0aKrfZ;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tTfwb-000000007Jn-0EDt;
 Fri, 03 Jan 2025 14:34:21 +0300
From: muradm <mail@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,  Maxim Cournoyer
 <maxim.cournoyer@HIDDEN>, 75270 <at> debbugs.gnu.org
Subject: Re: [bug#75270] [PATCH 0/3] services: greetd: Improve greeter
 configurations.
In-Reply-To: <cover.1735771462.git.mail@HIDDEN> (muradm's message of "Thu, 
 2 Jan 2025 01:47:50 +0300")
References: <cover.1735771462.git.mail@HIDDEN>
User-Agent: mu4e 1.12.7; emacs 29.4
Date: Fri, 03 Jan 2025 14:34:20 +0300
Message-ID: <87msg85dxf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

--=-=-=
Content-Type: text/plain; format=flowed


btw, this will solve 64112, 65769 and 70605.

muradm <mail@HIDDEN> writes:

> Improves greeter configuration and adds new gtkgreet greeter.
>
> muradm (3):
>   services: greetd: Improve greeter configurations.
>   gnu: Add gtkgreet.
>   services: greetd: Add new gtkgreet greeter.
>
>  doc/guix.texi          | 153 +++++++++++++++------
>  gnu/packages/admin.scm |  25 +++-
>  gnu/services/base.scm  | 295 
>  ++++++++++++++++++++++++-----------------
>  gnu/tests/desktop.scm  |  14 +-
>  4 files changed, 322 insertions(+), 165 deletions(-)
>
>
> base-commit: 151865ada4afb70b57e5f44248fce5bda9080af5

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmd3yzwACgkQ6M7O0mLO
BeLP2hAAtJV/xrG8KlZgpoQOWXq4Yd6wCycxlxHnBrpuZ8lPuc68A4Bx+CLtLG1v
SFLiJ0/KXYPWIsahLB1UBKBvNRmY1wXWi6NyLkcdxpi++P3YezV3RnBmzEXilDbP
uiJ+o3n7WQYPNIBt/ZaKXSJ+JK4E5qe2DrzHr9vklNdLxc47gy4rzpApb7IHDT3E
eo1SuA/Zg+Rk/UOOfL0Y/Aanvv6g+816G8QLTaAxAMn9owcQuIPZu/GFI1jED8w1
in7cjU3riXFlNtNFkZvAjV84uhFrTXiesbmGW1R99eAeH8SbUarYnAxgmw1gMOtB
ATRv2/rEUiGhCKeLkuMVPFng3xhIlFh5NYkBEHgWu0U9MyhlyR6M53CjQxi0FTBz
5Ycj138EmK8AIrXjvL3907SR08GgdIdFkGumRWbWInU29aniT6tkfk3y3nYVWG4Z
CxPLpkeiQW24+czRO+1rjnamYI/8puYBsVzJU6ei4BkEh2yemUgge0jdeCnt67/p
ZxI8GzQFrgD+P6aBYq5F9CDaRI/+6X7BONBLnNRt1BY2wN2gRRUZ67lVCWVPEaPX
VlRgNbSvMOh4DQMNk8Ocpfh/IOR0yhpPyZ2s9QuPAsnpWu8GorFuY8C8EI7JUrnf
aQP7BebHYBBAb9elr4o++oFbipDWmaU0F8ywlrEuE9VOm94eLDI=
=4+MS
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 75270) by debbugs.gnu.org; 1 Jan 2025 22:53:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 17:53:31 2025
Received: from localhost ([127.0.0.1]:40811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT7aj-0001pf-JF
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:31 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:39252)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tT7af-0001oz-9H
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:27 -0500
Received: from localhost ([127.0.0.1]:50660)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tT7Wu-0008NF-06
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 22:49:32 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=cJBhLSVcA8x0OwpvLhBQX2NHb4ZsULty4ObNuN2Q1IE=; b=CjNw3NnwTjU53gP5j3k2bteWw+
 lVg4cvEt3BNmuKWrFWbSUa/Yb5pDgKX4CmB8gnXan/sZzhnrhJC4YyOztXfNMrwf0Flef7uU8pkxj
 ObSuU5r2FOEyIyCtoxeab6JE96VxciVvUuyAvWAAHBcm4OXq5sBxBR1a4pM7WQrvYW4yLAqbfBaxJ
 UOZcequKUoPNunH68UBpcpu7xqXs+/TlxGqB2I8ZZ3mtErznTS+WJmefpqzFaFoWAqu2dku4lyOGM
 VANrhReKRL3FIcEG1wrZ2JjVDomjYg1Tr95Pb4ccQo5tuRK6D86VDbZaQoGrJgYeJDicBqjjeTGio
 JLZgze+OstNy1Y2meHApmU9trearksnn0VHi3qCC0/fzQjUVTSR2SkelJo0nxzGQoA0PuJlLQdcra
 1OjpAVeT2eGqbr75GtTDo1tIAOCx5S53Y4C05Z9sSN1Bt3oEn7vveO8AJT7/Ib6SbVO5QO5mYg3xz
 +IyiPuHnsYn1dW27bEgvSgb1;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tT7aY-000000004fb-2CY4
 for 75270 <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:53:18 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH 1/3] services: greetd: Improve greeter configurations.
Date: Thu,  2 Jan 2025 01:53:13 +0300
Message-ID: <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

This improvement focuses on providing common user session scripts
for use by multiple greeters. It also fixes incorrect use of
`XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires compositor to
run. We provide common sway based greeter script, which can be
shared by other graphical greeters.

* gnu/services/base.scm (<greetd-user-session>): Common user session
factored-out, for shared use by multiple greeters.
(<greetd-agreety-session>): Switch to common user session.
(<greetd-wlgreet-color>): New record, `wlgreet` color holder.
(<greetd-wlgreet-configuration>): Refactor `wlgreet` configuration.
(<greetd-wlgreet-sway-session>): Switch to common user session.
* gnu/tests/desktop.scm (%minimal-services): Reflect configuration
changes.
* doc/guix.texi (Base Services): Document refactoring changes.

Change-Id: Id53d993b453f464abf842b2767ec3ce25ed4348a
---
 doc/guix.texi         | 115 ++++++++++++------
 gnu/services/base.scm | 264 ++++++++++++++++++++++--------------------
 gnu/tests/desktop.scm |  14 ++-
 3 files changed, 229 insertions(+), 164 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 924f13f0f6..6d0c349b1a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20510,13 +20510,21 @@ Base Services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
@@ -20584,19 +20592,20 @@ Base Services
 The user to use for running the greeter.
 
 @item @code{default-session-command} (default: @code{(greetd-agreety-session)})
-Can be either instance of @code{greetd-agreety-session} configuration or
+Can be either @code{greetd-agreety-session}, @code{greetd-wlgreet-sway-session} or
 @code{gexp->script} like object to use as greeter.
 
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-agreety-session
-Configuration record for the agreety greetd greeter.
+@deftp {Data Type} greetd-user-session
+Configuration record for the user session command. Greeters require user command
+to be specified in some or another way. @code{greetd-user-session} provides a
+common command for that. User should prefer stable shell command like @code{bash},
+which can start actual user terminal shell, window manager or desktop environment
+with its own mechanism, which would be @code{~/.bashrc} in case of @code{bash}.
 
 @table @asis
-@item @code{agreety} (default: @code{greetd})
-The package with @command{/bin/agreety} command.
-
 @item @code{command} (default: @code{(file-append bash "/bin/bash")})
 Command to be started by @command{/bin/agreety} on successful login.
 
@@ -20606,6 +20615,10 @@ Base Services
 @item @code{extra-env} (default: @code{'()})
 Extra environment variables to set on login.
 
+@item @code{xdg-session-type} (default: @code{"tty"})
+Specify the value of @code{XDG_SESSION_TYPE}. User environment may
+adapt depending on its value (normaly by @code{.bashrc} or similar).
+
 @item @code{xdg-env?} (default: @code{#t})
 If true @code{XDG_RUNTIME_DIR} and @code{XDG_SESSION_TYPE} will be set
 before starting command. One should note that, @code{extra-env} variables
@@ -20614,60 +20627,86 @@ Base Services
 @end table
 @end deftp
 
-@deftp {Data Type} greetd-wlgreet-session
-Generic configuration record for the wlgreet greetd greeter.
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
 
 @table @asis
-@item @code{wlgreet} (default: @code{wlgreet})
-The package with the @command{/bin/wlgreet} command.
+@item @code{agreety} (default: @code{greetd})
+The package with @command{/bin/agreety} command.
 
-@item @code{command} (default: @code{(file-append sway "/bin/sway")})
-Command to be started by @command{/bin/wlgreet} on successful login.
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
-@item @code{command-args} (default: @code{'()})
-Command arguments to pass to command.
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-color
+
+@table @asis
+@item @code{red}
+Value of red.
+
+@item @code{green}
+Value of green.
+
+@item @code{blue}
+Value of blue.
+
+@item @code{opacity}
+Value of opacity.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-wlgreet-configuration
 
+@table @asis
 @item @code{output-mode} (default: @code{"all"})
 Option to use for @code{outputMode} in the TOML configuration file.
 
 @item @code{scale} (default: @code{1})
 Option to use for @code{scale} in the TOML configuration file.
 
-@item @code{background} (default: @code{'(0 0 0 0.9)})
+@item @code{background} (default: @code{(greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))})
 RGBA list to use as the background colour of the login prompt.
 
-@item @code{headline} (default: @code{'(1 1 1 1)})
+@item @code{headline} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the headline colour of the UI popup.
 
-@item @code{prompt} (default: @code{'(1 1 1 1)})
+@item @code{prompt} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the prompt colour of the UI popup.
 
-@item @code{prompt-error} (default: @code{'(1 1 1 1)})
+@item @code{prompt-error} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the error colour of the UI popup.
 
-@item @code{border} (default: @code{'(1 1 1 1)})
+@item @code{border} (default: @code{(greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))})
 RGBA list to use as the border colour of the UI popup.
 
-@item @code{extra-env} (default: @code{'()})
-Extra environment variables to set on login.
-
 @end table
 @end deftp
 
 @deftp {Data Type} greetd-wlgreet-sway-session
-Sway-specific configuration record for the wlgreet greetd greeter.
+Configuration record for the in sway wlgreet greetd greeter.
 
 @table @asis
-@item @code{wlgreet-session} (default: @code{(greetd-wlgreet-session)})
-A @code{greetd-wlgreet-session} record for generic wlgreet configuration,
-on top of the Sway-specific @code{greetd-wlgreet-sway-session}.
-
 @item @code{sway} (default: @code{sway})
-The package providing the @command{/bin/sway} command.
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
 
-@item @code{sway-configuration} (default: #f)
-File-like object providing an additional Sway configuration file to be
-prepended to the mandatory part of the configuration.
+@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{wlgreet} (default: @code{wlgreet})
+The package with the @command{/bin/wlgreet} command.
+
+@item @code{wlgreet-config} (default: @code{(greetd-wlgreet-configuration)})
+Configuration of @code{wlgreet} represented by @code{greetd-wlgreet-configuration}.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
 
 @end table
 
@@ -20675,8 +20714,7 @@ Base Services
 
 @lisp
   (greetd-configuration
-   ;; We need to give the greeter user these permissions, otherwise
-   ;; Sway will crash on launch.
+   ;; Graphical greeter require additional group membership.
    (greeter-supplementary-groups (list "video" "input" "seat"))
    (terminals
     (list (greetd-terminal-configuration
@@ -20685,7 +20723,10 @@ Base Services
            (default-session-command
             (greetd-wlgreet-sway-session
              (sway-configuration
-              (local-file "sway-greetd.conf"))))))))
+              (local-file "sway-greetd.conf")) ;; optional extra sway configuration
+             (command
+              (greetd-user-session
+               (xdg-session-type "wayland")))))))))
 @end lisp
 @end deftp
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 75ce4e8fe5..b12c352954 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2021 qblade <qblade@HIDDEN>
 ;;; Copyright © 2021 Hui Lu <luhuins@HIDDEN>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@HIDDEN>
 ;;; Copyright © 2022 Justin Veilleux <terramorpha@HIDDEN>
 ;;; Copyright © 2022 ( <paren@HIDDEN>
@@ -274,8 +274,10 @@ (define-module (gnu services base)
             greetd-service-type
             greetd-configuration
             greetd-terminal-configuration
+            greetd-user-session
             greetd-agreety-session
-            greetd-wlgreet-session
+            greetd-wlgreet-color
+            greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
 
             %base-services))
@@ -3381,161 +3383,175 @@ (define %qemu-static-networking
 ;;; greetd-service-type -- minimal and flexible login manager daemon
 ;;;
 
-(define-record-type* <greetd-agreety-session>
-  greetd-agreety-session make-greetd-agreety-session
-  greetd-agreety-session?
-  (agreety greetd-agreety (default greetd))
-  (command greetd-agreety-command (default (file-append bash "/bin/bash")))
-  (command-args greetd-agreety-command-args (default '("-l")))
-  (extra-env greetd-agreety-extra-env (default '()))
-  (xdg-env? greetd-agreety-xdg-env? (default #t)))
-
-(define (greetd-agreety-tty-session-command config)
-  (match-record config <greetd-agreety-session>
+(define-record-type* <greetd-user-session>
+  greetd-user-session make-greetd-user-session
+  greetd-user-session?
+  (command greetd-user-session-command (default (file-append bash "/bin/bash")))
+  (command-args greetd-user-session-command-args (default '("-l")))
+  (extra-env greetd-user-session-extra-env (default '()))
+  (xdg-session-type greetd-user-session-xdg-session-type (default "tty"))
+  (xdg-env? greetd-user-session-xdg-env? (default #t)))
+
+(define (make-greetd-user-session-command config)
+  (match-record config <greetd-user-session>
     (command command-args extra-env)
     (program-file
-     "agreety-tty-session-command"
+     "greetd-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
-(define (greetd-agreety-tty-xdg-session-command config)
-  (match-record config <greetd-agreety-session>
-    (command command-args extra-env)
+(define (make-greetd-xdg-user-session-command config)
+  (match-record config <greetd-user-session>
+    (command command-args extra-env xdg-session-type)
     (program-file
-     "agreety-tty-xdg-session-command"
+     "greetd-xdg-user-session-command"
      #~(begin
          (use-modules (ice-9 match))
          (let*
              ((username (getenv "USER"))
               (useruid (passwd:uid (getpwuid username)))
               (useruid (number->string useruid)))
-           (setenv "XDG_SESSION_TYPE" "tty")
+           (setenv "XDG_SESSION_TYPE" #$xdg-session-type)
            (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid)))
          (for-each (match-lambda ((var . val) (setenv var val)))
                    (quote (#$@extra-env)))
          (apply execl #$command #$command (list #$@command-args))))))
 
+(define-gexp-compiler (greetd-user-session-compiler
+                       (session <greetd-user-session>)
+                       system target)
+  (lower-object
+   ((if (greetd-user-session-xdg-env? session)
+        make-greetd-xdg-user-session-command
+        make-greetd-user-session-command) session)))
+
+(define-record-type* <greetd-agreety-session>
+  greetd-agreety-session make-greetd-agreety-session
+  greetd-agreety-session?
+  (agreety greetd-agreety (default greetd))
+  (command greetd-agreety-command (default (greetd-user-session))))
+
 (define-gexp-compiler (greetd-agreety-session-compiler
                        (session <greetd-agreety-session>)
                        system target)
-  (let ((agreety (file-append (greetd-agreety session)
-                              "/bin/agreety"))
-        (command ((if (greetd-agreety-xdg-env? session)
-                      greetd-agreety-tty-xdg-session-command
-                      greetd-agreety-tty-session-command)
-                  session)))
+  (let ((agreety (file-append (greetd-agreety session) "/bin/agreety"))
+        (command (greetd-agreety-command session)))
     (lower-object
-     (program-file "agreety-command"
-       #~(execl #$agreety #$agreety "-c" #$command)))))
-
-(define-record-type* <greetd-wlgreet-session>
-  greetd-wlgreet-session make-greetd-wlgreet-session
-  greetd-wlgreet-session?
-  (wlgreet greetd-wlgreet (default wlgreet))
-  (command greetd-wlgreet-command
-           (default (file-append sway "/bin/sway")))
-  (command-args greetd-wlgreet-command-args (default '()))
-  (output-mode greetd-wlgreet-output-mode (default "all"))
-  (scale greetd-wlgreet-scale (default 1))
-  (background greetd-wlgreet-background (default '(0 0 0 0.9)))
-  (headline greetd-wlgreet-headline (default '(1 1 1 1)))
-  (prompt greetd-wlgreet-prompt (default '(1 1 1 1)))
-  (prompt-error greetd-wlgreet-prompt-error (default '(1 1 1 1)))
-  (border greetd-wlgreet-border (default '(1 1 1 1)))
-  (extra-env greetd-wlgreet-extra-env (default '())))
-
-(define (greetd-wlgreet-wayland-session-command session)
-  (program-file "wlgreet-session-command"
-    #~(let* ((username (getenv "USER"))
-             (useruid (number->string
-                       (passwd:uid (getpwuid username))))
-             (command #$(greetd-wlgreet-command session)))
-        (use-modules (ice-9 match))
-        (setenv "XDG_SESSION_TYPE" "wayland")
-        (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-        (for-each (lambda (env) (setenv (car env) (cdr env)))
-                  '(#$@(greetd-wlgreet-extra-env session)))
-        (apply execl command command
-               (list #$@(greetd-wlgreet-command-args session))))))
-
-(define (make-wlgreet-config-color section-name color)
-  (match color
-    ((red green blue opacity)
-     (string-append
-      "[" section-name "]\n"
-      "red = " (number->string red) "\n"
-      "green = " (number->string green) "\n"
-      "blue = " (number->string blue) "\n"
-      "opacity = " (number->string opacity) "\n"))))
-
-(define (make-wlgreet-configuration-file session)
-  (let ((command (greetd-wlgreet-wayland-session-command session))
-        (output-mode (greetd-wlgreet-output-mode session))
-        (scale (greetd-wlgreet-scale session))
-        (background (greetd-wlgreet-background session))
-        (headline (greetd-wlgreet-headline session))
-        (prompt (greetd-wlgreet-prompt session))
-        (prompt-error (greetd-wlgreet-prompt-error session))
-        (border (greetd-wlgreet-border session)))
-    (mixed-text-file "wlgreet.toml"
-      "command = \"" command "\"\n"
-      "outputMode = \"" output-mode "\"\n"
-      "scale = " (number->string scale) "\n"
-      (apply string-append
-             (map (match-lambda
-                    ((section-name . color)
-                     (make-wlgreet-config-color section-name color)))
-                  `(("background" . ,background)
-                    ("headline" . ,headline)
-                    ("prompt" . ,prompt)
-                    ("prompt-error" . ,prompt-error)
-                    ("border" . ,border)))))))
+     (program-file "agreety-wrapper" #~(execl #$agreety #$agreety "-c" #$command)))))
+
+(define (make-greetd-sway-greeter-command sway sway-config)
+  (let ((sway-bin (file-append sway "/bin/sway")))
+    (program-file
+     "greeter-sway-command"
+     #~(begin
+         (let* ((username (getenv "USER"))
+                (useruid (passwd:uid (getpwuid username)))
+                (useruid (number->string useruid))
+                ;; /run/user/<greeter-user-uid> won't exist yet
+                ;; this will contain WAYLAND_DISPLAY socket file
+                ;; and log-file below
+                (user-xdg-runtime-dir "/tmp/greeter-xdg-rt")
+                (log-file (string-append (number->string (getpid)) ".log"))
+                (log-file (string-append user-xdg-runtime-dir "/" log-file)))
+           (mkdir user-xdg-runtime-dir #o700)
+           (setenv "XDG_RUNTIME_DIR" user-xdg-runtime-dir)
+           (sleep 1) ;; give time to elogind or seatd
+           (dup2
+            (open-fdes
+             log-file
+             (logior O_CREAT O_WRONLY O_APPEND)
+             #o640)
+            1)
+           (dup2 1 2)
+           (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))
+
+(define-record-type* <greetd-wlgreet-color>
+  greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
+  (red greetd-wlgreet-color-red)
+  (green greetd-wlgreet-color-green)
+  (blue greetd-wlgreet-color-blue)
+  (opacity greetd-wlgreet-color-opacity))
+
+(define (greetd-wlgreet-color-for-section section-name color)
+  (match-record color <greetd-wlgreet-color>
+    (red green blue opacity)
+    (string-append
+     "[" section-name "]\n"
+     "red = " (number->string red) "\n"
+     "green = " (number->string green) "\n"
+     "blue = " (number->string blue) "\n"
+     "opacity = " (number->string opacity) "\n")))
+
+(define-record-type* <greetd-wlgreet-configuration>
+  greetd-wlgreet-configuration make-greetd-wlgreet-configuration
+  greetd-wlgreet-configuration?
+  (output-mode greetd-wlgreet-configuration-output-mode (default "all"))
+  (scale greetd-wlgreet-configuration-scale (default 1))
+  (background greetd-wlgreet-configuration-background
+              (default (greetd-wlgreet-color (red 0) (green 0) (blue 0) (opacity 0.9))))
+  (headline greetd-wlgreet-configuration-headline
+            (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt greetd-wlgreet-configuration-prompt
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (prompt-error greetd-wlgreet-configuration-prompt-error
+                (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1))))
+  (border greetd-wlgreet-configuration-border
+          (default (greetd-wlgreet-color (red 1) (green 1) (blue 1) (opacity 1)))))
+
+(define (make-greetd-wlgreet-configuration command color)
+  (match-record color <greetd-wlgreet-configuration>
+    (output-mode scale background headline prompt prompt-error border)
+    (mixed-text-file
+     "wlgreet.toml"
+     "command = \"" command "\"\n"
+     "outputMode = \"" output-mode "\"\n"
+     "scale = " (number->string scale) "\n"
+     (apply string-append
+            (map (match-lambda
+                   ((section-name . color)
+                    (greetd-wlgreet-color-for-section section-name color)))
+                 `(("background" . ,background)
+                   ("headline" . ,headline)
+                   ("prompt" . ,prompt)
+                   ("prompt-error" . ,prompt-error)
+                   ("border" . ,border)))))))
 
 (define-record-type* <greetd-wlgreet-sway-session>
   greetd-wlgreet-sway-session make-greetd-wlgreet-sway-session
   greetd-wlgreet-sway-session?
-  (wlgreet-session greetd-wlgreet-sway-session-wlgreet-session       ;<greetd-wlgreet-session>
-                   (default (greetd-wlgreet-session)))
-  (sway greetd-wlgreet-sway-session-sway (default sway))             ;<package>
-  (sway-configuration greetd-wlgreet-sway-session-sway-configuration ;file-like
-                      (default (plain-file "wlgreet-sway-config" ""))))
-
-(define (make-wlgreet-sway-configuration-file session)
-  (let* ((wlgreet-session (greetd-wlgreet-sway-session-wlgreet-session session))
-         (wlgreet-config (make-wlgreet-configuration-file wlgreet-session))
-         (wlgreet (file-append (greetd-wlgreet wlgreet-session) "/bin/wlgreet"))
-         (sway-config (greetd-wlgreet-sway-session-sway-configuration session))
-         (swaymsg (file-append (greetd-wlgreet-sway-session-sway session)
-                               "/bin/swaymsg")))
-    (mixed-text-file "wlgreet-sway.conf"
-      "include " sway-config "\n"
-      "xwayland disable\n"
-      "exec \"" wlgreet " --config " wlgreet-config "; "
-      swaymsg " exit\"\n")))
+  (sway greetd-wlgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (wlgreet greetd-wlgreet-sway-session-wlgreet (default wlgreet))
+  (wlgreet-config greetd-wlgreet-sway-session-wlgreet-config
+                  (default (greetd-wlgreet-configuration)))
+  (command greetd-wlgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-wlgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-wlgreet-sway-session> sway sway-config wlgreet wlgreet-config command)
+     (let ((wlgreet-bin (file-append wlgreet "/bin/wlgreet"))
+           (wlgreet-config-file
+            (make-greetd-wlgreet-configuration command wlgreet-config))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "wlgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" wlgreet-bin " --config " wlgreet-config-file "; " swaymsg-bin " exit\"\n")))))
 
 (define-gexp-compiler (greetd-wlgreet-sway-session-compiler
                        (session <greetd-wlgreet-sway-session>)
                        system target)
-  (let ((sway (file-append (greetd-wlgreet-sway-session-sway session)
-                           "/bin/sway"))
-        (config (make-wlgreet-sway-configuration-file session)))
+  (match-record session <greetd-wlgreet-sway-session>
+    (sway)
     (lower-object
-     (program-file "wlgreet-sway-session-command"
-       #~(let* ((log-file (open-output-file
-                           (string-append "/tmp/sway-greeter."
-                                          (number->string (getpid))
-                                          ".log")))
-                (username (getenv "USER"))
-                (useruid (number->string (passwd:uid (getpwuid username)))))
-           ;; redirect stdout/err to log-file
-           (dup2 (fileno log-file) 1)
-           (dup2 1 2)
-           (sleep 1) ;give seatd/logind some time to start up
-           (setenv "XDG_RUNTIME_DIR" (string-append "/run/user/" useruid))
-           (execl #$sway #$sway "-d" "-c" #$config))))))
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-wlgreet-sway-session-sway-config session)))))
 
 (define-record-type* <greetd-terminal-configuration>
   greetd-terminal-configuration make-greetd-terminal-configuration
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index ef30442886..1693bbcebf 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -141,13 +141,21 @@ (define %minimal-services
                  (terminal-vt "2")
                  (default-session-command
                    (greetd-agreety-session
-                    (extra-env '(("MY_VAR" . "1")))
-                    (xdg-env? #f))))
+                    (command
+                     (greetd-user-session
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use different shell instead of default bash
                 (greetd-terminal-configuration
                  (terminal-vt "3")
                  (default-session-command
-                   (greetd-agreety-session (command (file-append zsh "/bin/zsh")))))
+                   (greetd-agreety-session
+                    (command
+                     (greetd-user-session
+                      (command (file-append zsh "/bin/zsh"))
+                      (command-args '())
+                      (extra-env '(("MY_VAR" . "1")))
+                      (xdg-env? #f))))))
                 ;; we can use any other executable command as greeter
                 (greetd-terminal-configuration
                  (terminal-vt "4")
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 1 Jan 2025 22:53:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 17:53:29 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 1tT7ai-0001pY-U7
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:29 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:39268)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tT7ag-0001p2-90
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:27 -0500
Received: from localhost ([127.0.0.1]:55150)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tT7Wv-0008NL-1i
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 22:49:33 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:
 Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=kumm07NwKd1q9BgoCMc0ce5/073p3/80Y9ltrNiedcQ=; b=a8yYA40DGC/pcs/FzPOr3GeB7r
 CMg8zNSW71iEdxbKdtwhYln8qT+Uanstnov/7+vB44/jFp4uRHO/P8W37hnNClX7Ku6xqHu9VkE+r
 3JEThXzN48LQYz5AbSDjdB3fvLGloS/yQvihCc46raqTx/efYgoxMyvZKy/nLYOEVd9Eezz4IAjxt
 l4Xrww2ZMJxrr0tD0SGf8d8zgX4gI2cXPrTt824ihm6YJz5sS8Fzzg7Kr8x6XsodmfRpWWHvoHQQR
 822PcbM7QMkaycfswaajCHiDi0VhDGFvHghQfQmEb444ed4cvx5Sp1eN1aRE35R51VJWnquYu7fcU
 x9jIGXQ4K5GzldbI5HUa8e51befCLiWHSz/J9yqgcx8I86Nju5kd752gdhl+lrjLuVPOq8H39g965
 IurOapVd8R4L8otrirjtmYyPx0tvSGFWbF9TjKxdo4Sb05UsI2jHmL6reD5hH8AoVYngeRiOYWPO0
 5Nl12gxRPnC6ZcqeHVF/uHHX;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tT7aa-000000004g9-0AEd
 for 75270 <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:53:20 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH 3/3] services: greetd: Add new gtkgreet greeter.
Date: Thu,  2 Jan 2025 01:53:15 +0300
Message-ID: <a9e9abeaba9b341c9656bb1fca649b7a2fefa356.1735771462.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/services/base.scm (<greetd-gtkgreet-sway-session>): New record,
represents `gtkgreet` greeter session configuration.
* doc/guix.texi (Base Services): Document new `gtkgreet` greeter.

Change-Id: I0445eac35aa685d676ab7208a125e46058dc6b1b
---
 doc/guix.texi         | 38 ++++++++++++++++++++++++++++++++++++++
 gnu/services/base.scm | 31 +++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6d0c349b1a..819d1de79f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20642,6 +20642,44 @@ Base Services
 @end table
 @end deftp
 
+@deftp {Data Type} greetd-gtkgreet-sway-session
+Configuration record for the gtkgreet greetd greeter.  Can be used as
+following:
+
+@lisp
+  (greetd-configuration
+   ;; Graphical greeter require additional group membership.
+   (greeter-supplementary-groups (list "video" "input" "seat"))
+   (terminals
+    (list (greetd-terminal-configuration
+           (terminal-vt "1")
+           (terminal-switch #t)
+           (default-session-command
+            (greetd-gtkgreet-sway-session
+             (command
+              (greetd-user-session
+               ;; signal to our .bashrc that we want wayland compositor
+               (xdg-session-type "wayland")))))))))
+@end lisp
+
+@table @asis
+@item @code{sway} (default: @code{sway})
+The package with @command{/bin/sway} and @command{/bin/swaymsg} commands.
+
+@item @code{sway-config} (default: @code{(plain-file "greetd-wlgreet-sway-config" "")})
+Extra configuration for sway to be included before executing greeter.
+
+@item @code{gtkgreet} (default: @code{gtkgreet})
+The package with @command{/bin/gtkgreet} command.
+
+@item @code{command} (default: @code{(greetd-user-session)})
+Command to be started by @command{/bin/agreety} on successful login.
+Normally should be a variation of @code{greetd-user-session}, but could
+be any @code{gexp->script} like object.
+
+@end table
+@end deftp
+
 @deftp {Data Type} greetd-wlgreet-color
 
 @table @asis
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b12c352954..444b959d2d 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -276,6 +276,7 @@ (define-module (gnu services base)
             greetd-terminal-configuration
             greetd-user-session
             greetd-agreety-session
+            greetd-gtkgreet-sway-session
             greetd-wlgreet-color
             greetd-wlgreet-configuration
             greetd-wlgreet-sway-session
@@ -3468,6 +3469,36 @@ (define (make-greetd-sway-greeter-command sway sway-config)
            (dup2 1 2)
            (execl #$sway-bin #$sway-bin "-d" "-c" #$sway-config))))))
 
+(define-record-type* <greetd-gtkgreet-sway-session>
+  greetd-gtkgreet-sway-session make-greetd-gtkgreet-sway-session
+  greetd-gtkgreet-sway-session?
+  (sway greetd-gtkgreet-sway-session-sway (default sway))
+  (sway-config greetd-wlgreet-sway-session-sway-config
+               (default (plain-file "greetd-wlgreet-sway-config" "")))
+  (gtkgreet greetd-gtkgreet-sway-session-gtkgreet (default gtkgreet))
+  (command greetd-gtkgreet-sway-session-command (default (greetd-user-session))))
+
+(define make-greetd-gtkgreet-sway-session-sway-config
+  (match-lambda
+    (($ <greetd-gtkgreet-sway-session> sway sway-config gtkgreet command)
+     (let ((gtkgreet-bin (file-append gtkgreet "/bin/gtkgreet"))
+           (swaymsg-bin (file-append sway "/bin/swaymsg")))
+       (mixed-text-file
+        "gtkgreet-sway-config"
+        "include " sway-config "\n"
+        "xwayland disable\n"
+        "exec \"" gtkgreet-bin " -l -c " command "; " swaymsg-bin " exit\"\n")))))
+
+(define-gexp-compiler (greetd-gtkgreet-sway-session-compiler
+                       (session <greetd-gtkgreet-sway-session>)
+                       system target)
+  (match-record session <greetd-gtkgreet-sway-session>
+    (sway)
+    (lower-object
+     (make-greetd-sway-greeter-command
+      sway
+      (make-greetd-gtkgreet-sway-session-sway-config session)))))
+
 (define-record-type* <greetd-wlgreet-color>
   greetd-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color?
   (red greetd-wlgreet-color-red)
-- 
2.47.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; Package guix-patches. Full text available.

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


Received: (at 75270) by debbugs.gnu.org; 1 Jan 2025 22:53:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 17:53:28 2025
Received: from localhost ([127.0.0.1]:40807 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT7ai-0001pV-Eb
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:28 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157]:39258)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tT7af-0001p1-Jl
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:53:27 -0500
Received: from localhost ([127.0.0.1]:55138)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tT7Wu-0008NI-2i
 for 75270 <at> debbugs.gnu.org; Wed, 01 Jan 2025 22:49:32 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:
 In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=jPWqyNDZ8vdmjjl8ak9VhVeNS5wOIAUWfZJXHWcK5Rw=; b=vkAkiFPu8yeboaCLitlDlyMmCL
 OZzkyZB3mZIH/tvERquwo/RirERlI1TW2xXj46ST1iCL9DjJBysDYZXQ18la4Lg176X98nv+jBKhI
 45/+RRFJEd/S1bS0vfwIWbk/9WsfWv/LxqPlEgSm1chZmVz9EQd45g2O5yY8SM4MwZBt4ssWlFQoy
 JXtYgQP1CDTLCBHRj0m+rVJQGKVK5+yh2n26Ec7XxQP5+1tlumbpfsHZY2gZI794SPFNLlCmHFqnv
 P2AnavnhxeIqVpx0l4FWo5ak6W18ILfjdhlq9ZBxq4DdmA2HBvu2kONNg7sfr9rskTeluqgDvC1QP
 S0tNBqJjk4rIS47PIxKSqbkjhBkWj5UyYf67CWfi8wCiXGaNxEC2jMYPqy7f8dYHVY0N5Yw+snByu
 OnJTPkr96teDfxeKdQH35KQWqjhUKGkWQwgkPPeg0B9iOJ05cIZlezBW/AS5mNtO7G/MZsjeauxSz
 ZXL4yH+RmdZwkSCpT7rdOh2h;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tT7aZ-000000004fs-1N5i
 for 75270 <at> debbugs.gnu.org; Thu, 02 Jan 2025 01:53:19 +0300
From: muradm <mail@HIDDEN>
To: 75270 <at> debbugs.gnu.org
Subject: [PATCH 2/3] gnu: Add gtkgreet.
Date: Thu,  2 Jan 2025 01:53:14 +0300
Message-ID: <9ce12983110cdfc1b9bc29c309aa0a639a2a0966.1735771462.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1735771462.git.mail@HIDDEN>
References: <cover.1735771462.git.mail@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Sharlatan Hellseher <sharlatanus@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75270
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.0 (-)

* gnu/packages/admin.scm (gtkgreet): New variable.

Change-Id: I1ba56f77dc4059ac17d1f8e9f0d89fd0f65cb008
---
 gnu/packages/admin.scm | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index dce93e4f3a..e28b59d51c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -44,7 +44,7 @@
 ;;; Copyright © 2021 WinterHound <winterhound@HIDDEN>
 ;;; Copyright © 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@HIDDEN>
-;;; Copyright © 2021 muradm <mail@HIDDEN>
+;;; Copyright © 2021, 2025 muradm <mail@HIDDEN>
 ;;; Copyright © 2021 pineapples <guixuser6392@HIDDEN>
 ;;; Copyright © 2021 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2021-2024 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
@@ -5827,6 +5827,29 @@ (define-public wlgreet
 on a GUI toolkit.")
       (license license:gpl3))))
 
+(define-public gtkgreet
+  (package
+    (name "gtkgreet")
+    (version "0.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://git.sr.ht/~kennylevinsen/gtkgreet")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bqxz39lc8vh6bkirvrbn2lgf1qz5b04lfwgp5xa1ki1bnm5i80q"))))
+    (build-system meson-build-system)
+    (native-inputs (list pkg-config scdoc))
+    (inputs (list gtk+ gtk-layer-shell json-c))
+    (synopsis "GTK based greeter for greetd")
+    (description
+     "GTK based greeter for greetd, to be run under cage or similar.")
+    (home-page "https://git.sr.ht/~kennylevinsen/gtkgreet")
+    (license license:gpl3+)))
+
 (define-public libseat
   (package
     (name "libseat")
-- 
2.47.1





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

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


Received: (at submit) by debbugs.gnu.org; 1 Jan 2025 22:48:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 17:48:04 2025
Received: from localhost ([127.0.0.1]:40792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tT7VT-0001ao-NK
	for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:48:03 -0500
Received: from lists.gnu.org ([2001:470:142::17]:51412)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mail@HIDDEN>) id 1tT7VR-0001aI-67
 for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 17:48:01 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1tT7VL-0000HL-SR
 for guix-patches@HIDDEN; Wed, 01 Jan 2025 17:47:55 -0500
Received: from nomad-cl1.muradm.net ([139.162.159.157])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1tT7VK-0004qL-AL
 for guix-patches@HIDDEN; Wed, 01 Jan 2025 17:47:55 -0500
Received: from localhost ([127.0.0.1]:49788)
 by nomad-cl1.muradm.net with esmtps (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1)
 (envelope-from <mail@HIDDEN>) id 1tT7Rc-0008Mt-15
 for guix-patches@HIDDEN; Wed, 01 Jan 2025 22:44:04 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; 
 s=mail;
 h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:
 From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=iY5E+U2yqSR4LamCL36VRwCVhH6l+4xpZkiAzam2fvQ=; b=vyEFjGPby9EliL3OYdFOFCBEfc
 FyzF4nJHg9KgcEmPjoIWnsoEwJQz6DNaDzMYerMvXB34QDsd6QNm8rDH2tCZ/Mm1ydTC1xbKDC9tF
 2C6kyBfaiFIMVVtu96BSnXJrLQ9TjENJ9mPrc5gSSbjs/Pbi9WLiyOrbj5RTS3b/glhAMSfrdzk+/
 fMInl55su4kV4eEXfHWhHxYIkAT2G04Cpd3sNYMPkWJjwXWy1dPJEg9SrRFrHiUoByNdrcnLh24zS
 rwUUi8C4+oTb0sD64WS8G57O7kh2udkBZPnUj61q0GC4CO/3izYDW02TEqNdm885K6sxx4B/yAEFv
 rtLbwiARr+FHO41zGCn0NuM8FYynEDhFT378z1zaXm6W/9/ABlra/3dNjVUyzgrlTtRNj8EfHm+p3
 yh39Md32s4RSdgJm59f4/A0g6XWcvSiD0QVo3TEDMe3xSB5tiQM1z7HSSPUKa/81Uwcxgnx49EEoY
 TCEgik7pgzT5aaMAzJ2Q/+gE;
Received: from muradm by localhost with local (Exim 4.98)
 (envelope-from <mail@HIDDEN>) id 1tT7VG-000000004X7-1qVE
 for guix-patches@HIDDEN; Thu, 02 Jan 2025 01:47:50 +0300
From: muradm <mail@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/3] services: greetd: Improve greeter configurations.
Date: Thu,  2 Jan 2025 01:47:50 +0300
Message-ID: <cover.1735771462.git.mail@HIDDEN>
X-Mailer: git-send-email 2.47.1
MIME-Version: 1.0
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=139.162.159.157; envelope-from=mail@HIDDEN;
 helo=nomad-cl1.muradm.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
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.1 (/)

Improves greeter configuration and adds new gtkgreet greeter.

muradm (3):
  services: greetd: Improve greeter configurations.
  gnu: Add gtkgreet.
  services: greetd: Add new gtkgreet greeter.

 doc/guix.texi          | 153 +++++++++++++++------
 gnu/packages/admin.scm |  25 +++-
 gnu/services/base.scm  | 295 ++++++++++++++++++++++++-----------------
 gnu/tests/desktop.scm  |  14 +-
 4 files changed, 322 insertions(+), 165 deletions(-)


base-commit: 151865ada4afb70b57e5f44248fce5bda9080af5
-- 
2.47.1





Acknowledgement sent to muradm <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#75270; 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: Thu, 6 Feb 2025 14:15:02 UTC

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