diff --git a/doc/guix.texi b/doc/guix.texi index 99321929cc..86cfe7d49c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22442,7 +22442,7 @@ their default values are: @item handle-lid-switch-docked @code{ignore} @item handle-lid-switch-external-power -@code{ignore} +@code{*unspecified*} @item power-key-ignore-inhibited? @code{#f} @item suspend-key-ignore-inhibited? diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 29a3722f1b..f891d1b5cc 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Sou Bunnbu -;;; Copyright © 2017, 2020 Maxim Cournoyer +;;; Copyright © 2017, 2020, 2022 Maxim Cournoyer ;;; Copyright © 2017 Nikita ;;; Copyright © 2018, 2020 Efraim Flashner ;;; Copyright © 2018 Ricardo Wurmus @@ -971,7 +971,7 @@ (define-record-type* elogind-configuration (handle-lid-switch-docked elogind-handle-lid-switch-docked (default 'ignore)) (handle-lid-switch-external-power elogind-handle-lid-switch-external-power - (default 'ignore)) + (default *unspecified*)) (power-key-ignore-inhibited? elogind-power-key-ignore-inhibited? (default #f)) (suspend-key-ignore-inhibited? elogind-suspend-key-ignore-inhibited? @@ -1032,7 +1032,9 @@ (define (non-negative-integer x) (define handle-actions '(ignore poweroff reboot halt kexec suspend hibernate hybrid-sleep lock)) (define (handle-action x) - (enum x handle-actions)) + (if (unspecified? x) + "" ;empty serializer + (enum x handle-actions))) (define (sleep-list tokens) (unless (valid-list? tokens char-set:user-name) (error "invalid sleep list" tokens))