aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi96
-rw-r--r--gnu/services/desktop.scm2
-rw-r--r--gnu/services/xorg.scm39
3 files changed, 91 insertions, 46 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 4a32cdff5d..c3b97cea1f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11001,6 +11001,65 @@ Xorg---is provided by the @code{(gnu services xorg)} module. Note that
there is no @code{xorg-service} procedure. Instead, the X server is
started by the @dfn{login manager}, currently SLiM.
+@defvr {Scheme Variable} slim-service-type
+This is the type for the SLiM graphical login manager for X11.
+
+@cindex session types (X11)
+@cindex X11 session types
+SLiM looks for @dfn{session types} described by the @file{.desktop} files in
+@file{/run/current-system/profile/share/xsessions} and allows users to
+choose a session from the log-in screen using @kbd{F1}. Packages such
+as @code{xfce}, @code{sawfish}, and @code{ratpoison} provide
+@file{.desktop} files; adding them to the system-wide set of packages
+automatically makes them available at the log-in screen.
+
+In addition, @file{~/.xsession} files are honored. When available,
+@file{~/.xsession} must be an executable that starts a window manager
+and/or other X clients.
+@end defvr
+
+@deftp {Data Type} slim-configuration
+Data type representing the configuration of @code{slim-service-type}.
+
+@table @asis
+@item @code{allow-empty-passwords?} (default: @code{#t})
+Whether to allow logins with empty passwords.
+
+@item @code{auto-login?} (default: @code{#f})
+@itemx @code{default-user} (default: @code{""})
+When @code{auto-login?} is false, SLiM presents a log-in screen.
+
+When @code{auto-login?} is true, SLiM logs in directly as
+@code{default-user}.
+
+@item @code{theme} (default: @code{%default-slim-theme})
+@itemx @code{theme-name} (default: @code{%default-slim-theme-name})
+The graphical theme to use and its name.
+
+@item @code{auto-login-session} (default: @code{windowmaker})
+The default session to use when none is specified.
+
+@item @code{startx} (default: @code{(xorg-start-command)})
+The command used to start the X11 graphical server.
+
+@item @code{xauth} (default: @code{xauth})
+The XAuth package to use.
+
+@item @code{shepherd} (default: @code{shepherd})
+The Shepherd package used when invoking @command{halt} and
+@command{reboot}.
+
+@item @code{slim} (default: @code{slim})
+The SLiM package to use.
+@end table
+@end deftp
+
+@defvr {Scheme Variable} %default-theme
+@defvrx {Scheme Variable} %default-theme-name
+The default SLiM theme and its name.
+@end defvr
+
+
@deftp {Data Type} sddm-configuration
This is the data type representing the sddm service configuration.
@@ -11094,6 +11153,7 @@ Relogin after logout.
@end deftp
@cindex login manager
+@cindex X11 login
@deffn {Scheme Procedure} sddm-service config
Return a service that spawns the SDDM graphical login manager for config of
type @code{<sddm-configuration>}.
@@ -11105,42 +11165,6 @@ type @code{<sddm-configuration>}.
@end example
@end deffn
-@deffn {Scheme Procedure} slim-service [#:allow-empty-passwords? #f] @
- [#:auto-login? #f] [#:default-user ""] [#:startx] @
- [#:theme @var{%default-slim-theme}] @
- [#:theme-name @var{%default-slim-theme-name}]
-Return a service that spawns the SLiM graphical login manager, which in
-turn starts the X display server with @var{startx}, a command as returned by
-@code{xorg-start-command}.
-
-@cindex X session
-
-SLiM automatically looks for session types described by the @file{.desktop}
-files in @file{/run/current-system/profile/share/xsessions} and allows users
-to choose a session from the log-in screen using @kbd{F1}. Packages such as
-@var{xfce}, @var{sawfish}, and @var{ratpoison} provide @file{.desktop} files;
-adding them to the system-wide set of packages automatically makes them
-available at the log-in screen.
-
-In addition, @file{~/.xsession} files are honored. When available,
-@file{~/.xsession} must be an executable that starts a window manager
-and/or other X clients.
-
-When @var{allow-empty-passwords?} is true, allow logins with an empty
-password. When @var{auto-login?} is true, log in automatically as
-@var{default-user}.
-
-If @var{theme} is @code{#f}, use the default log-in theme; otherwise
-@var{theme} must be a gexp denoting the name of a directory containing the
-theme to use. In that case, @var{theme-name} specifies the name of the
-theme.
-@end deffn
-
-@defvr {Scheme Variable} %default-theme
-@defvrx {Scheme Variable} %default-theme-name
-The G-Expression denoting the default SLiM theme and its name.
-@end defvr
-
@deffn {Scheme Procedure} xorg-start-command [#:guile] @
[#:modules %default-xorg-modules] @
[#:fonts %default-xorg-fonts] @
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index ec33e1d5ec..78530b3454 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -854,7 +854,7 @@ with the administrator's password."
(define %desktop-services
;; List of services typically useful for a "desktop" use case.
- (cons* (slim-service)
+ (cons* (service slim-service-type)
;; Screen lockers are a pretty useful thing and these are small.
(screen-locker-service slock)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index e7b9d9adc5..c1955e0b65 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -52,7 +52,20 @@
%default-slim-theme
%default-slim-theme-name
+
slim-configuration
+ slim-configuration?
+ slim-configuration-slim
+ slim-configuration-allow-empty-passwords?
+ slim-configuration-auto-login?
+ slim-configuration-default-user
+ slim-configuration-theme
+ slim-configuration-theme-name
+ slim-configuration-xauth
+ slim-configuration-shepherd
+ slim-configuration-auto-login-session
+ slim-configuration-startx
+
slim-service-type
slim-service
@@ -355,17 +368,24 @@ which should be passed to this script as the first argument. If not, the
slim-configuration?
(slim slim-configuration-slim
(default slim))
- (allow-empty-passwords? slim-configuration-allow-empty-passwords?)
- (auto-login? slim-configuration-auto-login?)
- (default-user slim-configuration-default-user)
- (theme slim-configuration-theme)
- (theme-name slim-configuration-theme-name)
+ (allow-empty-passwords? slim-configuration-allow-empty-passwords?
+ (default #t))
+ (auto-login? slim-configuration-auto-login?
+ (default #f))
+ (default-user slim-configuration-default-user
+ (default ""))
+ (theme slim-configuration-theme
+ (default %default-slim-theme))
+ (theme-name slim-configuration-theme-name
+ (default %default-slim-theme-name))
(xauth slim-configuration-xauth
(default xauth))
(shepherd slim-configuration-shepherd
(default shepherd))
- (auto-login-session slim-configuration-auto-login-session)
- (startx slim-configuration-startx))
+ (auto-login-session slim-configuration-auto-login-session
+ (default (file-append windowmaker "/bin/wmaker")))
+ (startx slim-configuration-startx
+ (default (xorg-start-command))))
(define (slim-pam-service config)
"Return a PAM service for @command{slim}."
@@ -440,9 +460,10 @@ reboot_cmd " shepherd "/sbin/reboot\n"
;; Unconditionally add xterm to the system profile, to
;; avoid bad surprises.
(service-extension profile-service-type
- (const (list xterm)))))))
+ (const (list xterm)))))
+ (default-value (slim-configuration))))
-(define* (slim-service #:key (slim slim)
+(define* (slim-service #:key (slim slim) ;deprecated
(allow-empty-passwords? #t) auto-login?
(default-user "")
(theme %default-slim-theme)