[Top][All Lists]

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

Re: Deleting unnecessary services from %desktop-services

From: znavko
Subject: Re: Deleting unnecessary services from %desktop-services
Date: Sat, 1 Dec 2018 06:06:59 +0100 (CET)

Hello, Ricardo Wurmus! ok, thank you. But now I've not achieved what I need. avahi-damon, ntpd, networking rest in my system.

  (services (cons*  ;;(tor-service)
                    (service postgresql-service-type)
                      (remove (lambda (service)
                        (eq? (service-kind service)
                               avahi-service-type ntp-service-type networking))
                      );end of remove
                        c => (elogind-configuration (handle-lid-switch 'ignore)))
                    );;end of modify desktop-services
  ));;end of services

Also they are mentioned in use-modules:

(use-modules (gnu) (gnu system nss)
             (gnu services desktop)
             (srfi srfi-1) ;;for remove function
             (gnu services networking) ;;for remove ntp
             (gnu services avahi) ;;for remove avahi
             (gnu services xorg)
             (gnu services databases);;for postgres
(use-service-modules desktop)
(use-package-modules certs gnome)

But if I delete this use-modules lines, remove line will give the errors: unbound variable avahi-service-type, ntp-service-type, networking.
So, how to correct I do not know.

Nov 30, 2018, 5:55 AM by address@hidden:

address@hidden writes:
Guile Manual says 'remove' returns elements. But I need to remove elements.

“remove” does what you want. The “services” field expects a list of
services. When using “remove” on a list of services it returns a new
list of (possibly fewer) services. That’s exactly what you want.

“remove!”, on the other hand, mutates an existing value; you would need
to have it operate on an existing variable to mutate it. “remove” is
much more elegant.


reply via email to

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