From: muradm <mail@muradm.net>
To: 75270@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: [bug#75270] [PATCH v3 3/3] services: greetd: Add new gtkgreet greeter.
Date: Wed, 8 Jan 2025 20:47:43 +0300 [thread overview]
Message-ID: <07537fc2b7e7c5c2c9220d88ace006e4ca140962.1736358380.git.mail@muradm.net> (raw)
In-Reply-To: <cover.1736358380.git.mail@muradm.net>
* 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
prev parent reply other threads:[~2025-01-08 17:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87jzbar8oa.fsf@muradm.net>
2025-01-01 22:47 ` [bug#75270] [PATCH 0/3] services: greetd: Improve greeter configurations muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 1/3] " muradm
2025-01-03 13:23 ` Nicolas Graves via Guix-patches via
2025-01-03 17:08 ` muradm
2025-01-04 10:57 ` Nicolas Graves via Guix-patches via
2025-01-04 13:36 ` muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 2/3] gnu: Add gtkgreet muradm
2025-01-01 22:53 ` [bug#75270] [PATCH 3/3] services: greetd: Add new gtkgreet greeter muradm
2025-01-03 11:34 ` [bug#75270] [PATCH 0/3] services: greetd: Improve greeter configurations muradm
2025-01-04 16:14 ` [bug#75270] Fwd: [bug#75270] [PATCH 1/3] " Nicolas Graves via Guix-patches via
2025-01-04 16:58 ` [bug#75270] [PATCH v2 0/3] " muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 1/3] " muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 2/3] gnu: Add gtkgreet muradm
2025-01-04 16:58 ` [bug#75270] [PATCH v2 3/3] services: greetd: Add new gtkgreet greeter muradm
2025-01-08 17:47 ` [bug#75270] [PATCH v3 0/3] services: greetd: Improve greeter configurations muradm
2025-01-08 17:47 ` [bug#75270] [PATCH v3 1/3] " muradm
2025-01-09 22:17 ` pelzflorian (Florian Pelz)
2025-01-08 17:47 ` [bug#75270] [PATCH v3 2/3] gnu: Add gtkgreet muradm
2025-01-08 17:47 ` muradm [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07537fc2b7e7c5c2c9220d88ace006e4ca140962.1736358380.git.mail@muradm.net \
--to=mail@muradm.net \
--cc=75270@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.