help-guix
[Top][All Lists]
Advanced

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

Re: Deleting unnecessary services from %desktop-services


From: Joshua Branson
Subject: Re: Deleting unnecessary services from %desktop-services
Date: Sat, 01 Dec 2018 08:47:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

<address@hidden> writes:

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

I thought that Pierre answered that for you:

> guix system: error: service 'ntpd' requires 'networking', which is not
> provided by any service

This is telling you that you can't have the ntpd service if you remove the
network stack, so
- either remove ntpd
- or add another network stack that provides 'networking' (maybe wicd or the
like).

>
>   (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.

I think that you have to have those modules defined so you can remove
the services.  Having that use modules line won't mean those services
are run.

>
> 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.
>
>  --
>  Ricardo



reply via email to

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