unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposal: auto-instantiate services with a default value
@ 2018-01-09  9:05 Ludovic Courtès
  2018-01-09 10:16 ` ng0
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Ludovic Courtès @ 2018-01-09  9:05 UTC (permalink / raw)
  To: Guix-devel

Hello Guix!

Currently on GuixSD, users have to explicitly specify all the services
they need, recursively.  For instance, if you add:

  (service rottlog-service-type)

to your ‘services’ field, you also need to add:

  (service mcron-service-type)

because the former happens to require the latter.  If you don’t do that,
you get an error message (see ‘fold-services’ in (gnu services)), and
then you go back to your config and add that line.

This was intentional, but it’s annoying, especially when considering
higher-level, complex services—imagine a MediaGoblin service: you
wouldn’t want to manually specify a dozen services that, to you, are an
implementation detail you’d rather ignore.

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.

How does that sound?

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-20 23:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).