[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)
(xfce-desktop-service)
(modify-services
(remove (lambda (service)
(eq? (service-kind service)
avahi-service-type ntp-service-type networking))
%desktop-services
);end of remove
(elogind-service-type
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.
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.
--
Ricardo
- Re: Deleting unnecessary services from %desktop-services,
znavko <=