From: "Thompson, David" <dthompson2@worcester.edu>
To: swedebugia@riseup.net
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Wed, 20 Jan 2016 09:17:15 -0500 [thread overview]
Message-ID: <CAJ=RwfZUEjhUTSor4a_4svsvGZbA5+GmL+XAORHiEa6QYe_6NQ@mail.gmail.com> (raw)
In-Reply-To: <fcc6ea3ba9b421a0dac9897b020cdc1b@riseup.net>
On Wed, Jan 20, 2016 at 7:42 AM, <swedebugia@riseup.net> 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:
(TYPE VARIABLE => BODY)
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 =>
(guix-configuration
(inherit config)
(use-substitutes? #f)
(extra-options '(\"--gc-keep-derivations\"))))
(mingetty-service-type config =>
(mingetty-configuration
(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
next prev parent reply other threads:[~2016-01-20 14:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 12:42 Deleting services from %desktop-services in operating system declaration swedebugia
2016-01-20 13:28 ` Efraim Flashner
2016-01-20 14:17 ` Thompson, David [this message]
2016-01-20 23:24 ` Ludovic Courtès
2016-01-23 13:09 ` swedebugia
2016-01-23 16:43 ` Alex Kost
2016-01-25 11:20 ` swedebugia
2016-01-25 22:52 ` Alex Kost
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='CAJ=RwfZUEjhUTSor4a_4svsvGZbA5+GmL+XAORHiEa6QYe_6NQ@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=help-guix@gnu.org \
--cc=swedebugia@riseup.net \
/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.