[Top][All Lists]

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

Re: Deleting services from %desktop-services in operating system declara

From: Thompson, David
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Wed, 20 Jan 2016 09:17:15 -0500

On Wed, Jan 20, 2016 at 7:42 AM,  <address@hidden> wrote:
> Hi
> I have trouble getting the syntax right to delete avahi and wicd from my
> config.scm.
> This did not work (inspecting with the REPL):
>   (services (cons* (tor-service) %desktop-services))
>   (modify-services (alist-delete
>                      wicd-service
>                      %desktop-services))
>   (modify-services (alist-delete
>                      avahi-service
>                      %desktop-services))
> Neither this:
>   (services (cons* (tor-service) %desktop-services))
>   (modify-services (alist-delete
>                      wicd-service
>                      avahi-service
>                      %desktop-services))
> The manual does not yet have examples of how to delete one or more entries
> from the %base-services or other lists.
> Help would be appreciated :)

First of all, %desktop-services is *not* an alist, so using
alist-delete certainly won't work.  Second, modify-services is
*syntax*, so the form (alist-delete ...) is surely the wrong syntax.

Below is the docstring for modify-services:

Modify the services listed in SERVICES according to CLAUSES.  Each clause
must have the form:


where TYPE is a service type, such as 'guix-service-type', and VARIABLE is an
identifier that is bound within BODY to the value of the service of that
TYPE.  Consider this example:

  (modify-services %base-services
    (guix-service-type config =>
                        (inherit config)
                        (use-substitutes? #f)
                        (extra-options '(\"--gc-keep-derivations\"))))
    (mingetty-service-type config =>
                            (inherit config)
                            (motd (plain-file \"motd\" \"Hi there!\")))))

It changes the configuration of the GUIX-SERVICE-TYPE instance, and that of
all the MINGETTY-SERVICE-TYPE instances.

This is a shorthand for (map (lambda (svc) ...) %base-services).

Hopefully that provides enough of an example for you!  You can
retrieve the documentation associated with an object at the Guile
REPL.  Here's how you'd get this one:

$ ./pre-inst-env guile
GNU Guile 2.0.11
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> ,use (gnu services)
scheme@(guile-user)> ,describe modify-services

- Dave

reply via email to

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