From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCHES] Add elogind service
Date: Wed, 02 Sep 2015 21:10:19 +0200 [thread overview]
Message-ID: <87si6w7i3o.fsf@gnu.org> (raw)
In-Reply-To: <874mjetlfy.fsf@igalia.com> (Andy Wingo's message of "Tue, 01 Sep 2015 13:42:41 +0200")
Andy Wingo <wingo@igalia.com> skribis:
> From fdd8893f287696fb016e9e78fbcba04d03840ee6 Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@pobox.com>
> Date: Tue, 18 Aug 2015 10:05:24 +0200
> Subject: [PATCH 1/7] gnu: elogind: Update to version 219.12.
>
> * gnu/packages/freedesktop.scm (elogind): Update to 219.12. Use a tarball
> instead of a git checkout.
OK! Thanks for making the tarball.
> From 4f32d646cf14133a98899c448d588088c80d680d Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@pobox.com>
> Date: Tue, 18 Aug 2015 11:56:17 +0200
> Subject: [PATCH 2/7] gnu: Add elogind service.
>
> * gnu/services/desktop.scm (elogind-configuration-file, elogind-service): New
> functions.
> (%desktop-services): Add elogind-service.
[...]
> +(define-with-required-kwargs elogind-configuration-file
> + (kill-user-processes? kill-only-users kill-exclude-users
> + inhibit-delay-max-seconds
> + handle-power-key handle-suspend-key handle-hibernate-key
> + handle-lid-switch handle-lid-switch-docked
> + power-key-ignore-inhibited? suspend-key-ignore-inhibited?
> + hibernate-key-ignore-inhibited? lid-switch-ignore-inhibited?
> + holdoff-timeout-seconds
> + idle-action idle-action-seconds
> + runtime-directory-size-percent runtime-directory-size
> + remove-ipc?
> + suspend-state suspend-mode
> + hibernate-state hibernate-mode
> + hybrid-sleep-state hybrid-sleep-mode)
[...]
> +(define* (elogind-service #:key (elogind elogind)
> + (kill-user-processes? #f)
> + (kill-only-users '()) (kill-exclude-users '("root"))
> + (inhibit-delay-max-seconds 5)
> + (handle-power-key 'poweroff)
> + (handle-suspend-key 'suspend)
> + (handle-hibernate-key 'hibernate)
> + (handle-lid-switch 'suspend)
> + (handle-lid-switch-docked 'ignore)
> + (power-key-ignore-inhibited? #f)
> + (suspend-key-ignore-inhibited? #f)
Nice.
My inclination would be to either let people provide the raw
configuration file via ‘local-file’ or ‘plain-file’ (and provide a
default one), but obviously that’s not as nice, or to use
‘define-record-type*’ to create an <elogind-configuration> record with
sensible default values (similar to <nscd-configuration>, for instance.)
I have a preference for the latter.
WDYT?
(It’s OK to add a macro to generate the record’s getter identifiers
since there are so many of them.)
Thank you!
Ludo’.
prev parent reply other threads:[~2015-09-02 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 11:42 [PATCHES] Add elogind service Andy Wingo
2015-09-01 11:53 ` [PATCHES] Whip polkit into shape Andy Wingo
2015-09-01 11:57 ` Andy Wingo
2015-09-02 19:18 ` Ludovic Courtès
2015-09-02 15:53 ` [PATCHES] Add elogind service Thompson, David
2015-09-02 19:10 ` Ludovic Courtès [this message]
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=87si6w7i3o.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.com \
/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.