@@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
Copyright @copyright{} 2021 Raghav Gururajan@*
Copyright @copyright{} 2021 Domagoj Stolfa@*
Copyright @copyright{} 2021 Hui Lu@*
+Copyright @copyright{} 2021 muradm@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -19694,6 +19695,188 @@ and ``passwd'' is with the value @code{passwd}.
@end table
@end deftp
+@defvr {Scheme Variable} seatd-service-type
+A minimal seat management daemon, and a universal seat management library.
+
+Seat management takes care of mediating access to shared devices (graphics,
+input), without requiring the applications needing access to be root.
+
+In general should be used as replacement to @code{elogind-service-type}.
+
+@lisp
+(append
+ (list
+ ;; make sure seatd is running
+ (service seatd-service-type)
+
+ (service greetd-service-type
+ (greetd-configuration
+ (terminals
+ (list
+ ;; lets have terminals 1, 2 and 3 run default XDG terminal session
+ (greetd-terminal-configuration (terminal-vt "1"))
+ (greetd-terminal-configuration (terminal-vt "2"))
+ (greetd-terminal-configuration (terminal-vt "3"))
+ ;; and terminals 4, 5 and 6 plain bash terminal session
+ ;; although not so plain, just to illustrate flexibility
+ (greetd-terminal-configuration
+ (terminal-vt "4")
+ (default-session-command greetd-agreety-tty-session))
+ (greetd-terminal-configuration
+ (terminal-vt "5")
+ (default-session-command greetd-agreety-tty-session))
+ (greetd-terminal-configuration
+ (terminal-vt "6")
+ (default-session-command greetd-agreety-tty-session))))))
+
+ ;; normaly one would want %base-services
+ (modify-services %desktop-services
+ ;; seatd/greetd combination can replace these
+ (delete elogind-service-type)
+ (delete agetty-service-type)
+ (delete mingetty-service-type)))
+
+@end lisp
+
+@end defvr
+
+@deftp {Data Type} seatd-configuration
+Configuration record for the seatd daemon service.
+
+@table @asis
+@item @code{seatd} (default: @code{seatd})
+The seatd package to use.
+
+@item @code{user} (default: @samp{"root"})
+User to own the seatd socket.
+
+@item @code{group} (default: @samp{"users"})
+Group to own the seatd socket.
+
+@item @code{socket} (default: @samp{"/run/seatd/socket"})
+Where to create the seatd socket.
+
+@item @code{loglevel} (default: @samp{"error"})
+Log level to output logs. Possible values: @samp{"silent"}, @samp{"error"},
+@samp{"info"} and @samp{"debug"}.
+
+@end table
+@end deftp
+
+@defvr {Scheme Variable} greetd-service-type
+greetd is a minimal and flexible login manager daemon that makes no
+assumptions about what you want to launch.
+
+If you can run it from your shell in a TTY, greetd can start it. If it
+can be taught to speak a simple JSON-based IPC protocol, then it can
+be a greeter.
+
+@code{<greetd-service-type>} provides necessary infrastructure for
+logging in users, including:
+
+@itemize @bullet
+@item
+@code{greetd} PAM service
+
+@item
+Special variation of @code{pam-mount} to mount @code{XDG_RUNTIME_DIR}
+
+@end itemize
+
+@end defvr
+
+@deftp {Data Type} greetd-configuration
+Configuration record for the greetd service.
+
+@table @asis
+@item @code{motd}
+A file-like object containing the ``message of the day''.
+
+@item @code{allow-empty-passwords?} (default: @code{#t})
+Allow empty passwords by default so that first-time users can log in when
+the 'root' account has just been created.
+
+@item @code{terminals} (default: @code{'()})
+List of @code{<greetd-terminal-configuration>} per terminal for which
+@code{greetd} should be started.
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-terminal-configuration
+Configuration record for per terminal greetd daemon service.
+
+@table @asis
+@item @code{greetd} (default: @code{greetd})
+The greetd package to use.
+
+@item @code{config-file-name}
+Configuration file name to use for greetd daemon. Generally, autogenerated
+derivation based on @code{terminal-vt} value.
+
+@item @code{terminal-vt} (default: @samp{"7"})
+The VT to run on. Use of a specific VT with appropriate conflict avoidance
+is recommended.
+
+@item @code{default-session-user} (default: @samp{"greeter"})
+The user to use for running the greeter.
+
+@item @code{default-session-command} (default: @code{greetd-agreety-tty-xdg-session})
+The command-line to run to start the default session.
+
+Possible values are:
+
+@itemize @bullet
+@item
+@code{greetd-agreety-tty-session} - bash terminal session
+
+@item
+@code{greetd-agreety-tty-xdg-session} - bash terminal session with XDG environment
+
+@item
+@code{greetd-agreety-session} - custom instance of terminal session
+@end itemize
+
+@end table
+@end deftp
+
+@deftp {Data Type} greetd-agreety-session
+Configuration record for the agreety greetd greeter.
+
+@table @asis
+@item @code{package} (default: @code{bash})
+The package of command.
+
+@item @code{command-bin} (default: @samp{"/bin/bash"})
+Path to binary relative to @code{package}.
+
+@item @code{command-args} (default: @code{'("-l")})
+Command arguments to pass to command.
+
+@item @code{extra-env} (default: @code{'()})
+Extra environment variables to set on login.
+
+@item @code{command-generator}
+Function that receives instance of this configuration as an argument and
+returns @code{program-file} that can be used with @code{agreety} greeter.
+
+Both @code{greetd-agreety-tty-session} and @code{greetd-agreety-tty-xdg-session}
+uses @code{greetd-agreety-session} under the hood.
+
+@end table
+@end deftp
+
+@defvr {Scheme Variable} greetd-agreety-tty-session
+Provides instance of @code{greetd-agreety-session} which starts @samp{"bash -l"}
+on login.
+@end defvr
+
+@defvr {Scheme Variable} greetd-agreety-tty-xdg-session
+Provides instance of @code{greetd-agreety-session} which starts @samp{"bash -l"}
+on login. Additionally, will set @code{XDG_SESSION_TYPE} and
+@code{XDG_RUNTIME_DIR} environment variables for session.
+@end defvr
+
@node Sound Services
@subsection Sound Services