mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: greetd: Support initial-session.
* gnu/services/base.scm (<greetd-terminal-configuration>): Add initial-session-user, initial-session-command. * doc/guix.texi (Base Services): Document them. Change-Id: Iaf7a8203f34794bc36b031166e1ff7005d7a7104
This commit is contained in:
parent
227fb11eb3
commit
72996cd573
2 changed files with 23 additions and 3 deletions
|
@ -20896,6 +20896,15 @@ Make this terminal active on start of @code{greetd}.
|
|||
Whether to source @file{/etc/profile} and @file{~/.profile}, when they
|
||||
exist.
|
||||
|
||||
@item @code{initial-session-user} (default: @samp{#f})
|
||||
The user to use for running the initial session, if any.
|
||||
|
||||
@item @code{initial-session-command} (default: @code{#f})
|
||||
The command to run the first time the greeter starts up, to auto-login.
|
||||
For that to be useful, you should also set @code{initial-session-user}.
|
||||
Then, greetd will automatically log in with that user and execute that command.
|
||||
When you eventually log out again, the regular greeter will appear.
|
||||
|
||||
@item @code{default-session-user} (default: @samp{"greeter"})
|
||||
The user to use for running the greeter.
|
||||
|
||||
|
|
|
@ -3954,7 +3954,10 @@ to handle."
|
|||
(source-profile? greetd-source-profile? (default #t))
|
||||
(default-session-user greetd-default-session-user (default "greeter"))
|
||||
(default-session-command greetd-default-session-command
|
||||
(default (greetd-agreety-session))))
|
||||
(default (greetd-agreety-session)))
|
||||
(initial-session-user greetd-initial-session-user (default #f))
|
||||
(initial-session-command greetd-initial-session-command
|
||||
(default #f)))
|
||||
|
||||
(define (default-config-file-name config)
|
||||
(string-join (list "config-" (greetd-terminal-vt config) ".toml") ""))
|
||||
|
@ -3969,7 +3972,9 @@ to handle."
|
|||
(terminal-vt (greetd-terminal-vt config))
|
||||
(terminal-switch (greetd-terminal-switch config))
|
||||
(default-session-user (greetd-default-session-user config))
|
||||
(default-session-command (greetd-default-session-command config)))
|
||||
(default-session-command (greetd-default-session-command config))
|
||||
(initial-session-user (greetd-initial-session-user config))
|
||||
(initial-session-command (greetd-initial-session-command config)))
|
||||
(mixed-text-file
|
||||
config-file-name
|
||||
"[general]\n"
|
||||
|
@ -3979,7 +3984,13 @@ to handle."
|
|||
"switch = " (if terminal-switch "true" "false") "\n"
|
||||
"[default_session]\n"
|
||||
"user = " default-session-user "\n"
|
||||
"command = " default-session-command "\n")))
|
||||
"command = " default-session-command "\n"
|
||||
(if (and initial-session-user initial-session-command)
|
||||
(string-append
|
||||
"[initial_session]\n"
|
||||
"user = " initial-session-user "\n"
|
||||
"command = " initial-session-command "\n")
|
||||
""))))
|
||||
|
||||
(define %greetd-file-systems
|
||||
(list (file-system
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue