guix-devel
[Top][All Lists]
Advanced

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

Re: Services can now have a default value


From: Ricardo Wurmus
Subject: Re: Services can now have a default value
Date: Sun, 23 Apr 2017 12:23:59 +0200
User-agent: mu4e 0.9.18; emacs 25.1.1

ng0 <address@hidden> writes:

> Ricardo Wurmus transcribed 0.6K bytes:
>>
>> ng0 <address@hidden> writes:
>>
>> > Because I still don't think modify-services is documented well enough
>>
>> What do you find under-documented about “modify-services”?  The manual
>> includes an example and a syntax definition, both of which are pretty
>> clear in my opinion.
>>
>> Could you please take a look at “6.2.15.3 Service Reference” (especially
>> where “modify-services” is documented) and “6.2.1 Using the
>> Configuration System” (sub-heading “System Services”), and tell us what
>> you consider to be unclear?
[…]
>
> It's probably well documented from a programmers point of view, I have
> no open question in that regard, but from a users point of view there
> is the question open how many modify-services can there be?

We don’t distinguish between programmers and users.  As the
documentation says, “modify-services” is just syntactic sugar for more
basic list operations.  It takes a list of services and returns another
list of services.  This means you can use it as often as you want and
glue the results together, though it doesn’t really make sense to use it
more often than once when you glue together a custom list of services
and pass that to it.

> If I want to keep %base-services as is and just want to modify one
> of the extra services (openssh for example), how does an example
> look like?

You just need to pass your list of services to “modify-services”.  You
don’t *have* to pass it a pre-defined list of services; *any* list of
services will be fine, even something like

    (cons (tor-service) %default-services)

> Questions like these. You think it's clear because the programming
> side is covered. Documentation includes the easy to understand
> user (I don't like the separation of btw) side.

I don’t see a big difference between these two groups in terms of what
instructions they need.  Users are programming when they write
configurations, and to make that easier we provide more readable syntax
macros like “modify-services”.  The “services” field of the
“operating-system” thing expects you to pass a list of services; it
doesn’t care how you get to that list.

--
Ricardo

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




reply via email to

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