From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id APQSEqK6fmdnJQEA62LTzQ:P1 (envelope-from ) for ; Wed, 08 Jan 2025 17:49:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id APQSEqK6fmdnJQEA62LTzQ (envelope-from ) for ; Wed, 08 Jan 2025 18:49:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=hpZlWYRX; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=FyHPeavo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=muradm.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736358561; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=R9px4pc3nM/7AAyoepLQ+R+E1pygKu0wNzqjHEzT+s8=; b=qPjlCt7rQy1T0T570xAo+ItazQwN29JZvYe5cBW4Uu724WA10xkqucLRnLAoUSZG+TzL+Z dPgcE//9Wq0YDtyockaTigsxgppcs98ePu5TGLDZH/u1tchptd+Sj+bi2Yl21+1Uvk3srV ux0hunSZO5oRLf9cgSZVCXuWsEF7KZxTpfPCaBmG71KBBibD+rxcJUp3nx3tkQDmDuOdT3 OPPSoy2SPvJMb9899mb5/qvEz6P1+Fy5a2mE3FQz4rdztst0FD2aU4vRZvP7JZj5z43fSp U0RjttKXLy1OdJR82YFv37BtLt9clr4fByF4RpGTStJIKu/Lq2OmavWy0Dul/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=hpZlWYRX; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=FyHPeavo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=muradm.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736358561; a=rsa-sha256; cv=none; b=CqxUpRMlRV0IOxFYqwGOcwSHZOicy2GCKLvWiYnLIpA8BfLa8zpJL48+Fkf4GixO2rRURU T15CiGhiHoyaOVomgJ5Yi47EwReZALGNSnStv6s4Pim3GEL6dyOTkZkvIM9/sr6xFSrQcO +/R2CMFEA++9bEkre9EiSJpwY5IuHiaOp+FxLdpnvEhfLwegJ/lr95t/k9hbX5vcMX5ARQ LTwkOHXszoJvUVB673ukr4hjwA/emsv2R7XL/33npVeGossqC6QnygjJOc9eDlevHnsUoY dLn70fDmXMOMjTkMYyU4puZ/PrraTO+mWButMNQcHyjMh+/s0Tq4yvhM4rwtHw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A3F1A7A63E for ; Wed, 08 Jan 2025 18:49:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVaB1-00080D-Ab; Wed, 08 Jan 2025 12:49:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVaAw-0007zS-VW for guix-patches@gnu.org; Wed, 08 Jan 2025 12:49:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVaAw-0004LL-My; Wed, 08 Jan 2025 12:49:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=R9px4pc3nM/7AAyoepLQ+R+E1pygKu0wNzqjHEzT+s8=; b=hpZlWYRXeRebrYJkzESIhP6PpejZjUfX58Oe4ayjV66QBlJWmyg0wlm1l96wAbhG+sptz2tKnyInwhufYuGGg4yk9p871kk7TGbPKbmtimgzKUPlH8f/KJZMSL/K1xiKHDpPT6QntsK4+YkUU1vgtqMVYut+5GPL1CHa1oQl8gcEKj4Yv4Gv66AbLCulJakBPzYLabWg/F6pTuWYQapDDFFcEtaEBJ1exmpajR35hAZmzEzvDyeH8P0mFvTRwi5FUu9OV7SasNcEdoI7WdeLEhIKs/WNM7eDxNgAEAR87LhS1TCgogmakNjnweh/nHRoufHU21tQzQsLeqOVeiO64w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVaAw-0008UD-Hw; Wed, 08 Jan 2025 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75270] [PATCH v3 3/3] services: greetd: Add new gtkgreet greeter. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75270 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75270@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 75270-submit@debbugs.gnu.org id=B75270.173635848732532 (code B ref 75270); Wed, 08 Jan 2025 17:49:02 +0000 Received: (at 75270) by debbugs.gnu.org; 8 Jan 2025 17:48:07 +0000 Received: from localhost ([127.0.0.1]:48876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVaA2-0008SZ-MU for submit@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 ) id 1tVa9r-0008R1-1v for 75270@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 ) id 1tVa5y-0004Pf-10 for 75270@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 ) id 1tVa9k-000000001mn-38Ty for 75270@debbugs.gnu.org; Wed, 08 Jan 2025 20:47:48 +0300 From: muradm Date: Wed, 8 Jan 2025 20:47:43 +0300 Message-ID: <07537fc2b7e7c5c2c9220d88ace006e4ca140962.1736358380.git.mail@muradm.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: A3F1A7A63E X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -0.07 X-Spam-Score: -0.07 X-TUID: 0Q2qkhWgUgtT * gnu/services/base.scm (): 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 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 + (($ 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 ) + system target) + (match-record session + (sway) + (lower-object + (make-greetd-sway-greeter-command + sway + (make-greetd-gtkgreet-sway-session-sway-config session))))) + (define-record-type* greetd-terminal-configuration make-greetd-terminal-configuration greetd-terminal-configuration? -- 2.47.1