From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: Proposal: auto-instantiate services with a default value Date: Tue, 9 Jan 2018 10:16:18 +0000 Message-ID: <20180109101618.zqzc2qw526m32gyx@abyayala> References: <87y3l7wgf5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wzssszqdsynbmyzc" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYqxP-0003jB-SX for guix-devel@gnu.org; Tue, 09 Jan 2018 05:16:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYqxO-0002DW-NC for guix-devel@gnu.org; Tue, 09 Jan 2018 05:16:35 -0500 Content-Disposition: inline In-Reply-To: <87y3l7wgf5.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel --wzssszqdsynbmyzc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s transcribed 1.3K bytes: > Hello Guix! >=20 > Currently on GuixSD, users have to explicitly specify all the services > they need, recursively. For instance, if you add: >=20 > (service rottlog-service-type) >=20 > to your =E2=80=98services=E2=80=99 field, you also need to add: >=20 > (service mcron-service-type) >=20 > because the former happens to require the latter. If you don=E2=80=99t d= o that, > you get an error message (see =E2=80=98fold-services=E2=80=99 in (gnu ser= vices)), and > then you go back to your config and add that line. >=20 > This was intentional, but it=E2=80=99s annoying, especially when consider= ing > higher-level, complex services=E2=80=94imagine a MediaGoblin service: you > wouldn=E2=80=99t want to manually specify a dozen services that, to you, = are an > implementation detail you=E2=80=99d rather ignore. >=20 > We discussed some time ago the possibility to automatically instantiate > services. Now that service types have default value, I think it=E2=80=99= s a > viable approach: if a service is required, and *if* it provides a > default value, then we can automatically instantiate it. >=20 > So in the example above, you=E2=80=99d just specify =E2=80=98rottlog-serv= ice-type=E2=80=99 and > an =E2=80=98mcron-service-type=E2=80=99 would be automatically added if i= t=E2=80=99s not already > there. >=20 > How does that sound? >=20 > Ludo=E2=80=99. Sounds alright to me. --=20 GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588 GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys WWW: https://n0.is/a/ :: https://ea.n0.is --wzssszqdsynbmyzc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlpUlnIACgkQ4i+bv+40 hYhyFg//QbQhSxu8sK1lcp9UoORA+T9gBRghxqLucnN0c7XXHFZydcyT/dGaFf22 I3vyeu0xI1JOxF0lKPOzURJXvqv8uQadbhT0C7m4FbIWrbZHSrHJO5sZSwZ0xbM1 RQ0Rc59avaEdG09H7Oq1xsGbIOK2eNwXDV4bbKe040aOKoVyb2DPBRLPA2dKxt1D zfbDS1lUZ/4WaUbNGluAbvwVImOggW0XC7+MpjT+ZtwSOV1v+/fc4wDw6ceW9i2U NcO5m3Z/DVbjjBHa7dTVtNzCJBeoBo6tbMddglDANBlHaPMjL3EvVH29CGB8T36c 0us5pWf+FX4X6lEt+2tGRDUe1ZyaTeje5Wf8De2cATZ5cUtirD7F4HC7ax37YVZ5 mCKudL22vbe9Mpucdo+TmXRY8LOwuc0DDv5QMDIRV9dfsjjtTveZdTyzRWlJuvAE i19QGmBauX/PkiNPzAFUlvQCRc9giGHncjQm7pJM2dN3mLaIcvoggaVmz58lPxbQ N+ZcRMzy1DiniAGSOlcM3B57jUbNz+6ytBHomcEt/9IdsrY9QRvZD3IH+BvITfo6 zh7MNkzgSI7UFKH/d4vXy2WR+Y1q8oIBaDGcntvLXHGAwOLxA/2tg7ese7iOrJ+r 3xGkKQIzhbGsA8q4hiIgcni/9G2xaP+saElBlcXqLfpH+B1It0g= =cqy6 -----END PGP SIGNATURE----- --wzssszqdsynbmyzc--