all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joshua Branson <jbranso@fastmail.com>
To: help-guix@gnu.org
Subject: Re: Deleting unnecessary services from %desktop-services
Date: Sat, 01 Dec 2018 08:47:18 -0500	[thread overview]
Message-ID: <87bm65l5p5.fsf@fastmail.com> (raw)
In-Reply-To: <LSc9OWx--3-1@tutanota.com> (znavko's message of "Sat, 1 Dec 2018 06:06:59 +0100 (CET)")

<znavko@tutanota.com> 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 rekado@elephly.net:
>
>  znavko@tutanota.com 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	other threads:[~2018-12-01 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 19:38 Deleting unnecessary services from %desktop-services znavko
2018-11-27 22:46 ` Pierre Neidhardt
2018-11-29  7:09   ` znavko
2018-11-30  2:55     ` Ricardo Wurmus
2018-12-01  5:06       ` znavko
2018-12-01 13:47         ` Joshua Branson [this message]
2018-12-01 15:28           ` znavko
2018-12-01 20:07             ` Ricardo Wurmus
2018-12-02 16:09               ` znavko

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=87bm65l5p5.fsf@fastmail.com \
    --to=jbranso@fastmail.com \
    --cc=help-guix@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.