all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: swedebugia@riseup.net
To: ludo@gnu.org
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Sat, 23 Jan 2016 14:09:58 +0100	[thread overview]
Message-ID: <6dc1e0b7fdda09d86a990c97484b5964@riseup.net> (raw)
In-Reply-To: <87io2nu95d.fsf@gnu.org>

On 2016-01-21 00:24, ludo@gnu.org wrote:
> swedebugia@riseup.net skribis:
> 
>> I have trouble getting the syntax right to delete avahi and wicd from
>> my config.scm.
> 
> The correct syntax would be:
> 
>   (operating-system
>     ;; …
>     (services (remove (lambda (service)
>                         (or (eq? (service-kind service)
>                                  wicd-service-type)
>                             (eq? (service-kind service)
>                                  avahi-service-type)))
>                       %desktop-services)))

I tried this and got this error:
# guix system reconfigure /etc/config/config.scm
guix system: error: failed to load '/etc/config/config.scm':
/etc/config/config.scm:48:12: In procedure #<procedure a7c3530 ()>:
/etc/config/config.scm:48:12: In procedure module-lookup: Unbound 
variable: remove

Config here: https://paste.debian.net/367385/

> As David notes, ‘%desktop-services’ is a list of service objects.  To
> remove elements from a list, the right procedure is ‘remove’ (info
> "(guile) SRFI-1 Filtering and Partitioning").

Thanks for the tip!

>> The manual does not yet have examples of how to delete one or more
>> entries from the %base-services or other lists.
> 
> I’ve added this example in commit 5d94ac5.

:)

cheers
sdb

  reply	other threads:[~2016-01-23 13:10 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
2016-01-20 23:24 ` Ludovic Courtès
2016-01-23 13:09   ` swedebugia [this message]
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=6dc1e0b7fdda09d86a990c97484b5964@riseup.net \
    --to=swedebugia@riseup.net \
    --cc=help-guix@gnu.org \
    --cc=ludo@gnu.org \
    /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.