From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id eMMIEe5oeWfUOAAAqHPOHw:P1 (envelope-from ) for ; Sat, 04 Jan 2025 16:59:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eMMIEe5oeWfUOAAAqHPOHw (envelope-from ) for ; Sat, 04 Jan 2025 17:59:26 +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=HT1Mt4rL; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=BNPEhbv+; 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=1736009966; 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=LyKUMIFhH5gL4ggbd5lbFNo+0XFD2zpkbzuY9NNBEc0=; b=WmQxFHlm7wIytu0odaTPEcNuwjzKoa7DvHMkS4WhCTQCmpAbnVMoOTryAvWunQB66kwLaP JG3foHPHhvIS+ItqCkYu3FEA9N7J6o1wI80J8CGnM0dGBUmldkkf3wQ9Al82CwTNLH8TU8 jiK0rsLrVZdYqhF0YEYrAsop6QEKpjyA1zU940S080jx5k+/c579ke9W2b05BTg9cT0QU1 /ihfl89XzSGXfsrQrPTbHbMcPKAHcwGGSGSweoSJjiGUyWebyvRvO3FKnp462uKTcRApc2 RKy3Slxu91SRCB58kSDGAsjO389GROFUCoDvf2pbK4ENWSDiuZKSruPc4j4OOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HT1Mt4rL; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=BNPEhbv+; 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=1736009966; a=rsa-sha256; cv=none; b=UpiIKGOz00NRUaAER+a5WOujwBophzuGYxic+qRU9MJcnAF4tLMCGywn9w9004kaHXVHrL ym9+hySC2yKNcDlUK7K0cIxu9KyWAWLl+G1dJqdvM39ocOCx+SQHe7hVvmrFii1WxVeyvn qlv8iqu/bfRrgABKjhEsXiKFN7Lsyq94K8//HXF1IF+X3NOHj3O6UpnTEPE/byvfNPUjwl sbuyVRAQsIoKKbd51vlJdGqTODnS1pkdidg+dYDQcyZPJGS4aWcS5NJRqCzumQ8tptw09L 7LGPZcH11cHvlBBRjn0F0Gh99kotEbHWPZDxjmflqmw/U4VikTLdOoWXB+5RIg== 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 DF2B7827D4 for ; Sat, 04 Jan 2025 17:59:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU7UR-0001dn-0G; Sat, 04 Jan 2025 11:59:07 -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 1tU7UO-0001d8-00 for guix-patches@gnu.org; Sat, 04 Jan 2025 11:59:04 -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 1tU7UN-0006Mw-MF; Sat, 04 Jan 2025 11:59:03 -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=LyKUMIFhH5gL4ggbd5lbFNo+0XFD2zpkbzuY9NNBEc0=; b=HT1Mt4rL8ytRPUMPsbCmbVUR8xW5/ZUpzZr75ilQpmLbqizhy8bk2GYkNwNYYzRrkyE3Ix9qK+klQt7psTm+UkEeF6YW+tuQBl6CCOQ5s2I8UqNFhMPDait1/QaGpnY969DgncjVmoo6/VHzBKzE6LyP79cXMbYsO4MngJtgnsoYb090MrLlZo22mbofwaMVpKtxXLuZpNAjdQoqucPQhAEBmO3+lJSZk88jMswNhTDxwtSqB8xqTXs/Gm1ApCtC7YjgwNcdXLacp1fGuP1okW6JwlbcKrktBjofhx3JdOP+YDLFgOCg8j9PDshY09JXTEYpCPr9jajb6PSYMnt2HQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU7UN-00021Q-G1; Sat, 04 Jan 2025 11:59:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75270] [PATCH v2 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: Sat, 04 Jan 2025 16:59:03 +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.17360099387737 (code B ref 75270); Sat, 04 Jan 2025 16:59:03 +0000 Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 16:58:58 +0000 Received: from localhost ([127.0.0.1]:56927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU7UI-00020i-1A for submit@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 ) id 1tU7UD-0001zw-MF for 75270@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 ) id 1tU7QP-0001uu-2a for 75270@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 ) id 1tU7U7-000000003VT-278t for 75270@debbugs.gnu.org; Sat, 04 Jan 2025 19:58:47 +0300 From: muradm Date: Sat, 4 Jan 2025 19:58:43 +0300 Message-ID: <78237de4acba4caf53dbfbfc358da29eb0bce2b5.1736009605.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-Spam-Score: -3.25 X-Spam-Score: -3.25 X-Migadu-Queue-Id: DF2B7827D4 X-Migadu-Scanner: mx10.migadu.com X-TUID: rAC9CT5AEOq+ * gnu/services/base.scm (): 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 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 + (($ 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 ) + 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-wlgreet-color make-greetd-wlgreet-color greetd-wlgreet-color? (red greetd-wlgreet-color-red) -- 2.47.1