From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: removing items from %desktop-services Date: Thu, 17 May 2018 16:28:18 +0200 Message-ID: <87y3gixsot.fsf@gnu.org> References: <20180516084452.GB1239@macbook41> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJJtI-0006HJ-2j for help-guix@gnu.org; Thu, 17 May 2018 10:28:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJJtF-00063a-0D for help-guix@gnu.org; Thu, 17 May 2018 10:28:24 -0400 In-Reply-To: <20180516084452.GB1239@macbook41> (Efraim Flashner's message of "Wed, 16 May 2018 11:44:52 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Efraim Flashner Cc: help-guix@gnu.org Hello, Efraim Flashner skribis: > I'm trying to modify the list of services in my os-config, and I've run > into a bit of a problem. I've replaced my ntp-service with an > openntpd-service, but I'm having trouble with the syntax for removing > more services. Here's a snippet: There=E2=80=99s an example of that in the manual (info "(guix) Using the Configuration System"): (remove (lambda (service) (eq? (service-kind service) avahi-service-type)) %desktop-services) I suppose you could do the same for ntpd. Now it=E2=80=99s a bit more verbose. In the snippets you posted you used =E2=80=98delete=E2=80=99, but that=E2=80=99ll only work if the service you = want to remove has the default configuration (and assuming it can be usefully compared with =E2=80=98equal?=E2=80=99), so the more verbose =E2=80=98remove=E2=80=99 sta= nza is needed. Now, just like we have =E2=80=98modify-services=E2=80=99, we could have =E2=80=98remove-services=E2=80=99 or similar, like this: (define (remove-services types services) (remove (lambda (service) (any (lambda (type) (eq? (service-kind service) type)) types)) services)) and then you could write: ;; Remove NTP and Avahi. (remove-services (list avahi-service-type ntp-service-type) %desktop-services) HTH! Ludo=E2=80=99.