summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormuradm <mail@muradm.net>2022-06-15 12:17:39 +0300
committerLars-Dominik Braun <ldb@leibniz-psychology.org>2022-06-17 10:30:41 +0200
commit530e0f02606a0e04818bdd792bb5239f7ee9e637 (patch)
treece4cea7ae572f568dacbcb5e7f8986e5da28c4f8 /doc
parent32ca068cb9f98698bd1c29b980ecd4ae36caf795 (diff)
downloadguix-patches-530e0f02606a0e04818bdd792bb5239f7ee9e637.tar
guix-patches-530e0f02606a0e04818bdd792bb5239f7ee9e637.tar.gz
gnu: base: Add greetd-service-type.
* gnu/services/base.scm (greetd-service-type): New variable * gnu/services/base.scm (greetd-configuration): New data type * gnu/services/base.scm (greetd-terminal-configuration): New data type * gnu/services/base.scm (greetd-agreety-session): New data type * gnu/services/base.scm (pam-limits-service-type): Should be aware of greetd PAM service * gnu/services/pam-mount.scm (pam-mount-pam-service): Should be aware of greetd PAM service Signed-off-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi137
1 files changed, 137 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index bd659d7036..d149732c19 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -97,6 +97,7 @@ Copyright @copyright{} 2021 Hui Lu@*
Copyright @copyright{} 2021 pukkamustard@*
Copyright @copyright{} 2021 Alice Brenon@*
Copyright @copyright{} 2021, 2022 Josselin Poiret@*
+Copyright @copyright{} 2021 muradm@*
Copyright @copyright{} 2021 Andrew Tropin@*
Copyright @copyright{} 2021 Sarah Morgensen@*
Copyright @copyright{} 2022 Remco van 't Veer@*
@@ -18227,6 +18228,142 @@ about the Pluggable Authentication Module (PAM) limits, refer to the
@samp{pam_limits} man page from the @code{linux-pam} package.
@end deffn
+@defvr {Scheme Variable} greetd-service-type
+@uref{https://git.sr.ht/~kennylevinsen/greetd, @code{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 geeter.
+
+@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
+
+Here is example of switching from @code{mingetty-service-type} to
+@code{greetd-service-type}, and how different terminals could be:
+
+@lisp
+ (append
+ (modify-services %base-services
+ ;; greetd-service-type provides "greetd" PAM service
+ (delete login-service-type)
+ ;; and can be used in place of mingetty-service-type
+ (delete mingetty-service-type))
+ (list
+ (service greetd-service-type
+ (greetd-configuration
+ (terminals
+ (list
+ ;; we can make any terminal active by default
+ (greetd-terminal-configuration (terminal-vt "1") (terminal-switch #t))
+ ;; we can make environment without XDG_RUNTIME_DIR set
+ ;; even provide our own environment variables
+ (greetd-terminal-configuration
+ (terminal-vt "2")
+ (default-session-command
+ (greetd-agreety-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")))))
+ ;; we can use any other executable command as greeter
+ (greetd-terminal-configuration
+ (terminal-vt "4")
+ (default-session-command (program-file "my-noop-greeter" #~(exit))))
+ (greetd-terminal-configuration (terminal-vt "5"))
+ (greetd-terminal-configuration (terminal-vt "6"))))))
+ ;; mingetty-service-type can be used in parallel
+ ;; if needed to do so, do not (delete login-service-type)
+ ;; as illustrated above
+ #| (service mingetty-service-type (mingetty-configuration (tty "tty8"))) |#))
+@end lisp
+@end defvr
+
+@deftp {Data Type} greetd-configuration
+Configuration record for the @code{greetd-service-type}.
+@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{log-file-name}
+Log file name to use for greetd daemon. Generally, autogenerated
+name 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{terminal-switch} (default: @code{#f})
+Make this terminal active on start of @code{greetd}.
+
+@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-session)})
+Can be either instance of @code{greetd-agreety-session} configuration 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.
+
+@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.
+
+@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{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
+are set right after mentioned variables, so that they can be overriden.
+
+@end table
+@end deftp
+
@node Scheduled Job Execution
@subsection Scheduled Job Execution