guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCHES] Get elogind-service working as intended


From: Andy Wingo
Subject: Re: [PATCHES] Get elogind-service working as intended
Date: Fri, 04 Sep 2015 09:57:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Thu 03 Sep 2015 23:23, Mark H Weaver <address@hidden> writes:

> These patches are needed to get Andy's elogind-service working as
> intended, e.g. to allow things like suspend-on-lid-close and various
> hot keys to work.
>
> I'm not really happy with any of these, so if someone wants to solve
> these problems in a better way, please don't hesitate to do so :)
>
> Comments and suggestions welcome.

Thanks for doing this!  I suggest we apply, just to get things working,
then work on expanding <service> to have more fields.  I can do that
later this morning.  I note also that there is still more work to do
related to PAM.

The problem is that there are services whose configuration should depend
on the set of services.  For example udev, which should add rules
corresponding to the colord service, etc.

Now one option would be to depend on on the set of services but on the
set of packages in the system install.  I agree with Mark that this is a
bad idea because you don't want to have to audit a package before adding
it to the system install.  On the other hand if privileges like
installing a udev rule are only accessible from services, that's easier
to audit because there are fewer services.

So then, for example, the elogind service would indicate that it
installs udev rules, dbus interfaces, and polkit rules from the elogind
package.  The udev service would then query all services, adding rules
from services that indicate that they extend the udev configuration.  To
do this I propose a "finalize-configuration" field in services.  First,
the services are collected into a list, as they are now.  Next, Guix
does something like this:

  (define (finalize-services services)
    (map (lambda (service)
           ((service-finalize service) service services))
         services))

The default service-finalize will be (lambda (service services)
service).  WDYT?

Cheers,

Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]