all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 61789@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#61789] [PATCH 15/27] services: desktop: Deprecate 'elogind-service' procedure.
Date: Sat, 25 Feb 2023 18:58:01 +0000	[thread overview]
Message-ID: <f33464dd5506686fec27c977ae1cd859285bc7b0.1677350249.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1677350249.git.mirai@makinata.eu>

* doc/guix.texi (Desktop Services): Replace 'elogind-service' with
'elogind-service-type'.
* gnu/services/desktop.scm (elogind-service): Deprecate procedure.
(desktop-services-for-system): Use elogind-service-type.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.
---
 doc/guix.texi            | 166 ++++++++++++++++++++++++---------------
 gnu/services/desktop.scm |   7 +-
 gnu/tests/lightdm.scm    |   2 +-
 3 files changed, 106 insertions(+), 69 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 05900d514a..2d69f94aa0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23312,77 +23312,113 @@ Desktop Services
 @var{services} must be equal to @code{(list avahi)}.
 @end deffn
 
-@deffn {Scheme Procedure} elogind-service [#:config @var{config}]
-Return a service that runs the @code{elogind} login and
-seat management daemon.  @uref{https://github.com/elogind/elogind,
-Elogind} exposes a D-Bus interface that can be used to know which users
+@subsubheading Elogind
+
+@uref{https://github.com/elogind/elogind, Elogind} is a login and seat
+management daemon that also handles most system-level power events for a
+computer, for example suspending the system when a lid is closed, or
+shutting it down when the power button is pressed.
+
+It also provides a D-Bus interface that can be used to know which users
 are logged in, know what kind of sessions they have open, suspend the
 system, inhibit system suspend, reboot the system, and other tasks.
 
-Elogind handles most system-level power events for a computer, for
-example suspending the system when a lid is closed, or shutting it down
-when the power button is pressed.
+@defvar elogind-service-type
+Type of the service that runs @command{elogind}, a login and
+seat management daemon.  The value for this service is a
+@code{<elogind-configuration>} object.
+@end defvar
 
-The @var{config} keyword argument specifies the configuration for
-elogind, and should be the result of an @code{(elogind-configuration
-(@var{parameter} @var{value})...)} invocation.  Available parameters and
-their default values are:
+@c TODO: field descriptions. This is best done by refactoring
+@c elogind-configuration to use define-configuration which embeds the
+@c descriptions in the code and then use configuration->documentation.
+@deftp {Data Type} elogind-configuration
+Data type representing the configuration of @command{elogind}.
+
+@table @asis
+@item @code{elogind} (default: @code{elogind}) (type: file-like)
+...
+
+@item @code{kill-user-processes?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{kill-only-users} (default: @code{'()}) (type: list)
+...
+
+@item @code{kill-exclude-users} (default: @code{'("root")}) (type: list-of-string)
+...
+
+@item @code{inhibit-delay-max-seconds} (default: @code{5}) (type: integer)
+...
+
+@item @code{handle-power-key} (default: @code{'poweroff}) (type: symbol)
+...
+
+@item @code{handle-suspend-key} (default: @code{'suspend}) (type: symbol)
+...
+
+@item @code{handle-hibernate-key} (default: @code{'hibernate}) (type: symbol)
+...
+
+@item @code{handle-lid-switch} (default: @code{'suspend}) (type: symbol)
+...
+
+@item @code{handle-lid-switch-docked} (default: @code{'ignore}) (type: symbol)
+...
+
+@item @code{handle-lid-switch-external-power} (default: @code{*unspecified*}) (type: symbol)
+...
+
+@item @code{power-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{suspend-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{hibernate-key-ignore-inhibited?} (default: @code{#f}) (type: boolean)
+...
+
+@item @code{lid-switch-ignore-inhibited?} (default: @code{#t}) (type: boolean)
+...
+
+@item @code{holdoff-timeout-seconds} (default: @code{30}) (type: integer)
+...
+
+@item @code{idle-action} (default: @code{'ignore}) (type: symbol)
+...
+
+@item @code{idle-action-seconds} (default: @code{(* 30 60)}) (type: integer)
+...
+
+@item @code{runtime-directory-size-percent} (default: @code{10}) (type: integer)
+...
+
+@item @code{runtime-directory-size} (default: @code{#f}) (type: integer)
+...
+
+@item @code{remove-ipc?} (default: @code{#t}) (type: boolean)
+...
+
+@item @code{suspend-state} (default: @code{'("mem" "standby" "freeze")}) (type: list)
+...
+
+@item @code{suspend-mode} (default: @code{'()}) (type: list)
+...
+
+@item @code{hibernate-state} (default: @code{'("disk")}) (type: list)
+...
+
+@item @code{hibernate-mode} (default: @code{'("platform" "shutdown")}) (type: list)
+...
+
+@item @code{hybrid-sleep-state} (default: @code{'("disk")}) (type: list)
+...
+
+@item @code{hybrid-sleep-mode} (default: @code{'("suspend" "platform" "shutdown")}) (type: list)
+...
 
-@table @code
-@item kill-user-processes?
-@code{#f}
-@item kill-only-users
-@code{()}
-@item kill-exclude-users
-@code{("root")}
-@item inhibit-delay-max-seconds
-@code{5}
-@item handle-power-key
-@code{poweroff}
-@item handle-suspend-key
-@code{suspend}
-@item handle-hibernate-key
-@code{hibernate}
-@item handle-lid-switch
-@code{suspend}
-@item handle-lid-switch-docked
-@code{ignore}
-@item handle-lid-switch-external-power
-@code{*unspecified*}
-@item power-key-ignore-inhibited?
-@code{#f}
-@item suspend-key-ignore-inhibited?
-@code{#f}
-@item hibernate-key-ignore-inhibited?
-@code{#f}
-@item lid-switch-ignore-inhibited?
-@code{#t}
-@item holdoff-timeout-seconds
-@code{30}
-@item idle-action
-@code{ignore}
-@item idle-action-seconds
-@code{(* 30 60)}
-@item runtime-directory-size-percent
-@code{10}
-@item runtime-directory-size
-@code{#f}
-@item remove-ipc?
-@code{#t}
-@item suspend-state
-@code{("mem" "standby" "freeze")}
-@item suspend-mode
-@code{()}
-@item hibernate-state
-@code{("disk")}
-@item hibernate-mode
-@code{("platform" "shutdown")}
-@item hybrid-sleep-state
-@code{("disk")}
-@item hybrid-sleep-mode
-@code{("suspend" "platform" "shutdown")}
 @end table
-@end deffn
+@end deftp
 
 @deffn {Scheme Procedure} accountsservice-service @
        [#:accountsservice @var{accountsservice}]
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index d4ac88311f..bc8f4eb026 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -114,7 +114,7 @@ (define-module (gnu services desktop)
 
             elogind-configuration
             elogind-configuration?
-            elogind-service
+            elogind-service  ; deprecated
             elogind-service-type
 
             %gdm-file-system
@@ -1216,7 +1216,8 @@ (define elogind-service-type
 their session types (graphical, console, remote, etc.).  It can also clean up
 after users when they log out.")))
 
-(define* (elogind-service #:key (config (elogind-configuration)))
+(define-deprecated (elogind-service #:key (config (elogind-configuration)))
+  elogind-service-type
   "Return a service that runs the @command{elogind} login and seat management
 service.  The @command{elogind} service integrates with PAM to allow other
 system components to know the set of logged-in users as well as their session
@@ -1807,7 +1808,7 @@ (define* (desktop-services-for-system #:optional
          (service colord-service-type)
          (geoclue-service)
          (service polkit-service-type)
-         (elogind-service)
+         (service elogind-service-type)
          (dbus-service)
 
          (service ntp-service-type)
diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm
index 57d029a75a..25fa06a9f1 100644
--- a/gnu/tests/lightdm.scm
+++ b/gnu/tests/lightdm.scm
@@ -48,7 +48,7 @@ (define minimal-desktop-services
         (service upower-service-type)
         (accountsservice-service)
         (service polkit-service-type)
-        (elogind-service)
+        (service elogind-service-type)
         (dbus-service)
         x11-socket-directory-service))
 
-- 
2.39.1





  parent reply	other threads:[~2023-02-25 19:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 18:53 [bug#61789] [PATCH 00/27] Deprecate old-style services Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 01/27] services: base: Deprecate 'host-name-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 02/27] services: base: Deprecate 'login-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 03/27] services: base: Deprecate 'mingetty-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 04/27] services: base: Deprecate 'agetty-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 05/27] doc: kmscon-service-type: Use @defvar @-command Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 06/27] services: base: Deprecate 'nscd-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 07/27] services: base: Deprecate 'syslog-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 08/27] services: base: Deprecate 'udev-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 09/27] services: base: Deprecate 'rngd-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 10/27] services: base: Deprecate 'pam-limits-service' procedure Bruno Victal
2023-03-03 16:40   ` [bug#61789] [PATCH 00/27] Deprecate old-style services Ludovic Courtès
2023-02-25 18:57 ` [bug#61789] [PATCH 11/27] services: tor: Deprecate 'tor-hidden-service' procedure Bruno Victal
2023-03-03 16:43   ` [bug#61789] ‘tor-hidden-service’ deprecation Ludovic Courtès
2023-03-05 17:51     ` Bruno Victal
2023-03-06 16:05       ` Ludovic Courtès
2023-02-25 18:57 ` [bug#61789] [PATCH 12/27] services: ssh: Deprecate 'lsh-service' procedure Bruno Victal
2023-02-25 18:57 ` [bug#61789] [PATCH 13/27] services: ssh: Deprecate 'dropbear-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 14/27] services: xorg: Deprecate 'screen-locker-service' procedure Bruno Victal
2023-03-03 16:45   ` [bug#61789] ‘screen-locker-service’ deprecation Ludovic Courtès
2023-03-06 14:36     ` Bruno Victal
2023-03-06 22:32       ` Ludovic Courtès
2023-02-25 18:58 ` Bruno Victal [this message]
2023-03-03 16:48   ` [bug#61789] ‘elogind-configuration’ documentation needs love Ludovic Courtès
2023-02-25 18:58 ` [bug#61789] [PATCH 16/27] services: elogind-configuration: Do not ignore 'handle-hibernate-key' by default Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 17/27] services: desktop: Deprecate 'accountsservice-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 18/27] services: dbus: Deprecate 'polkit-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 19/27] services: desktop: Deprecate 'udisks-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 20/27] services: desktop: Deprecate 'geoclue-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 21/27] services: desktop: Deprecate 'bluetooth-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 22/27] services: mail: Deprecate 'dovecot-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 23/27] services: vpn: Deprecate 'openvpn-client-service' & 'openvpn-server-service' procedures Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 24/27] services: lirc: Deprecate 'lirc-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 25/27] services: spice: Deprecate 'spice-vdagent-service' procedure Bruno Victal
2023-02-25 18:58 ` [bug#61789] [PATCH 26/27] services: dict: Deprecate 'dicod-service' procedure Bruno Victal
2023-03-03 16:52   ` [bug#61789] ‘dicod-service’ deprecation Ludovic Courtès
2023-02-25 18:58 ` [bug#61789] [PATCH 27/27] services: dbus: Deprecate 'dbus-service' procedure Bruno Victal
2023-03-03 17:09 ` [bug#61789] [PATCH 00/27] Deprecate old-style services Ludovic Courtès

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=f33464dd5506686fec27c977ae1cd859285bc7b0.1677350249.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=61789@debbugs.gnu.org \
    /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.