From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Proposal: auto-instantiate services with a default value
Date: Tue, 09 Jan 2018 13:25:48 +0100 [thread overview]
Message-ID: <87zi5nte0j.fsf@gnu.org> (raw)
In-Reply-To: <20180109115926.7e72673b@scratchpost.org> (Danny Milosavljevic's message of "Tue, 9 Jan 2018 11:59:26 +0100")
Hi,
Danny Milosavljevic <dannym@scratchpost.org> skribis:
> On Tue, 09 Jan 2018 10:05:34 +0100
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> We discussed some time ago the possibility to automatically instantiate
>> services. Now that service types have default value, I think it’s a
>> viable approach: if a service is required, and *if* it provides a
>> default value, then we can automatically instantiate it.
>>
>> So in the example above, you’d just specify ‘rottlog-service-type’ and
>> an ‘mcron-service-type’ would be automatically added if it’s not already
>> there.
>
> Yes, as long as there's a way for the user to easily see what it instantiated (in the running system).
‘operating-system-services’ would still only lists services that have
been explicitly specified, but ‘guix system extension-graph’ would show
everything.
> Also, that means that the instantiated mcron-service would automatically get a rottlog entry even though the mcron-service-types's default job list is empty, right ?
Correct.
> In that case it would be nice to be able to (optionally) override this mcron-service by a custom mcron-service in /etc/config.scm but retain the modified configuration with the implicit job in it. Is that possible?
Sure, the current way to do things (which is to explicitly list rottlog
*and* mcron) would remain valid, and you could pass your own mcron
config this way.
Ludo’.
next prev parent reply other threads:[~2018-01-09 12:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 9:05 Proposal: auto-instantiate services with a default value Ludovic Courtès
2018-01-09 10:16 ` ng0
2018-01-09 10:59 ` Danny Milosavljevic
2018-01-09 12:25 ` Ludovic Courtès [this message]
2018-01-09 13:42 ` Ricardo Wurmus
2018-01-09 20:42 ` Ludovic Courtès
2018-01-10 6:56 ` Chris Marusich
2018-01-20 23:26 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zi5nte0j.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=dannym@scratchpost.org \
--cc=guix-devel@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).