summaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
author45mg <[email protected]>2024-12-27 07:15:02 -0500
committerLudovic Courtès <[email protected]>2024-12-30 13:49:57 +0100
commit8695dcf9d2fb967377969b109e7aaef9fb500c40 (patch)
tree6406ea073409d3c7a2adda4ab77945c47f3bbc88 /doc/guix.texi
parentaefe57c69ffb2892df8e180b5487a4ac705f42e3 (diff)
services: elogind: Support hook directories.
Allow the user to specify scripts to be added into Elogind's hook directories. These scripts will be run before/after suspend/hibernate/poweroff/reboot. Also allow setting the associated config options. * gnu/services/desktop.scm (elogind-configuration): add `system-sleep-hook-files`, `system-shutdown-hook-files`, and 4 new config options. (elogind-configuration-file): Add entries for the new config options under the `[Sleep]` section. (elogind-etc-directory): New procedure. (elogind-service-type): Extend `etc-service-type` using `/etc/elogind`. * doc/guix.texi (Desktop Services): Document the new options. Change-Id: I7e22cbaa9d031049b9d085ba0ce4cc8a8b4f16ff Reviewed-by: Maxim Cournoyer <[email protected]> Signed-off-by: Ludovic Courtès <[email protected]>
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index dbcb39010a..c58468b910 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -134,6 +134,7 @@ Copyright @copyright{} 2024 Arnaud Daby-Seesaram@*
Copyright @copyright{} 2024 Nigko Yerden@*
Copyright @copyright{} 2024 Troy Figiel@*
Copyright @copyright{} 2024 Sharlatan Hellseher@*
+Copyright @copyright{} 2024 45mg@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -25374,6 +25375,32 @@ Data type representing the configuration of @command{elogind}.
@item @code{suspend-estimation-seconds} (default: @code{*unspecified*}) (type: integer)
...
+@item @code{system-sleep-hook-files} (default: @code{'()}) (type: list)
+A list of executables (file-like objects) that will be installed into
+the @file{/etc/elogind/system-sleep/} hook directory. For example:
+
+@lisp
+(elogind-configuration
+ (system-sleep-hook-files
+ (list (local-file "sleep-script"))))
+@end lisp
+
+See `Hook directories' in the @code{loginctl(1)} man page for more information.
+
+@item @code{system-shutdown-hook-files} (default: @code{'()}) (type: list)
+A list of executables (file-like objects) that will be installed into
+the @file{/etc/elogind/system-shutdown/} hook directory.
+
+@item @code{allow-power-off-interrupts?} (default: @code{#f}) (type: boolean)
+@itemx @code{allow-suspend-interrupts?} (default: @code{#f}) (type: boolean)
+Whether the executables in elogind's hook directories (see above) can
+cause a power-off or suspend action to be cancelled (interrupted) by
+printing an appropriate error message to stdout.
+
+@item @code{broadcast-power-off-interrupts?} (default: @code{#t}) (type: boolean)
+@itemx @code{broadcast-suspend-interrupts?} (default: @code{#t}) (type: boolean)
+Whether an interrupt of a power-off or suspend action is broadcasted.
+
@end table
@end deftp