From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Services can now have a default value Date: Sun, 23 Apr 2017 12:23:59 +0200 Message-ID: <87vapvs9q8.fsf@elephly.net> References: <87shl9qo7h.fsf@gnu.org> <20170415231142.xqo7bw7vqzpt3szc@abyayala> <87h91n5jsp.fsf@elephly.net> <20170419232249.nd6p4i4wzmekyvqv@abyayala> <878tmv5ukd.fsf@elephly.net> <20170420090916.nej3zkeovxtobept@abyayala> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2Egg-0005ki-Sy for guix-devel@gnu.org; Sun, 23 Apr 2017 06:24:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2Egf-0000SO-PW for guix-devel@gnu.org; Sun, 23 Apr 2017 06:24:14 -0400 In-reply-to: <20170420090916.nej3zkeovxtobept@abyayala> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel ng0 writes: > Ricardo Wurmus transcribed 0.6K bytes: >> >> ng0 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