GNU bug report logs - #28772
guix system reconfigure after kernel panic user or group not created

Previous Next

Package: guix;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Tue, 10 Oct 2017 05:52:01 UTC

Severity: normal

Tags: moreinfo

Full log


Message #29 received at 28772 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: guix-devel <at> gnu.org
Cc: 28772 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: 02/02: doc: Add an example to the documentation of the
 udev-service.
Date: Fri, 13 Oct 2017 10:35:43 +0200
Hi!

rekado <at> elephly.net (Ricardo Wurmus) skribis:

> commit e0c1d080b520c1bbd2dcd7bc90a750f5ce580486
> Author: Ricardo Wurmus <rekado <at> elephly.net>
> Date:   Mon Oct 9 23:03:56 2017 +0200
>
>     doc: Add an example to the documentation of the udev-service.
>     
>     * doc/guix.texi (Base Services): Update 'udev-service' documentation.

Good idea.

> +@example
> +(define %example-udev-rule
> +  (udev-rule "90-usb-thing.rules"
> +             "ACTION==\"add\", SUBSYSTEM==\"usb\", ATTR@{product@}==\"Example\", RUN+=\"/path/to/script\""))
> +
> +(operating-system
> +  ;; @dots{}
> +  (services (modify-services %desktop-services
> +              (udev-service-type config =>
> +                (udev-configuration (inherit config)
> +                  (rules (append (udev-configuration-rules config)
> +                                 (list %example-udev-rule))))))))
> +@end example

<https://bugs.gnu.org/28647> is somewhat related.

Fundamentally though, to simplify this use case, we should have:

  (define (additional-udev-rules . rules)
    "Add RULES, a list of file-like object, as a udev rules."
    (simple-service 'udev-rule udev-service-type rules))

so one can write:

  (operating-system
     ;; …
     (services (cons (additional-udev-rules %example-udev-rule)
                     %desktop-services)))

Thoughts?

Ludo’.




This bug report was last modified 3 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.