[Top][All Lists]

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

Re: It’s building!

From: Ricardo Wurmus
Subject: Re: It’s building!
Date: Sun, 22 Jan 2017 17:02:25 +0100
User-agent: mu4e 0.9.18; emacs 25.1.1

ng0 <address@hidden> 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) 

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.


GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC

reply via email to

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