all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: ng0 <contact.ng0@cryptolab.net>
Cc: guix-devel@gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: Re: It’s building!
Date: Sun, 22 Jan 2017 17:02:25 +0100	[thread overview]
Message-ID: <87d1ff13se.fsf@elephly.net> (raw)
In-Reply-To: <8760l7w88s.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me>


ng0 <contact.ng0@cryptolab.net> writes:

> For me it fails, I tried to adopt this to my
> %desktop-services-sans-ntpd but I haven't found the right way to
> make use of it:
>
> (define %desktop-services-sans-ntpd
>   ;; List of services typically useful for a "desktop" use case.
>   (cons* (slim-service)
>          (screen-locker-service slock)
>          (screen-locker-service xlockmore "xlock")
>          (avahi-service)
>          (wicd-service)
>          (udisks-service)
>          (upower-service)
>          (colord-service)
>          (geoclue-service)
>          (polkit-service)
>          (elogind-service)
>          (dbus-service)
>          (guix-service-type config =>

This isn’t going to work because you ripped this chunk from a
“modify-services” expression.

> Identation broken because this happens when you copy from emacs
> with X into terminal emacs.

You can use C-M-q to reindent an expression.

> Obviously this fails because "config" is not known.

That’s because you’re not doing this within “modify-services”.

> I'm open for ideas on how to erase ntp from the services in a
> better way, I'm running a replacement for ntpd.

You can use regular Scheme to filter lists, for example:

    (filter (compose not (cut eq? 'ntp <>) service-type-name service-kind) %desktop-services)

This means: run through all elements of “%desktop-services”, extract the
service type (“service-kind”), extract the type name from the kind (“service-type-name”), check if it’s equal
to 'ntp (“(cut eq? 'ntp <>)”), then throw it out (“not”).  The first
argument to “filter” is just a big function.


--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  reply	other threads:[~2017-01-22 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  6:28 It’s building! Maxim Cournoyer
2017-01-22 13:10 ` ng0
2017-01-22 16:02   ` Ricardo Wurmus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-12 16:10 Ludovic Courtès
2017-01-12 16:23 ` Kei Kebreau
2017-01-12 17:18   ` David Craven
2017-01-12 17:31   ` Alex Sassmannshausen
2017-01-15 22:32 ` Ludovic Courtès
2017-02-01  2:47 ` myglc2

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=87d1ff13se.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=contact.ng0@cryptolab.net \
    --cc=guix-devel@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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.