From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Proposal: auto-instantiate services with a default value Date: Tue, 09 Jan 2018 13:25:48 +0100 Message-ID: <87zi5nte0j.fsf@gnu.org> References: <87y3l7wgf5.fsf@gnu.org> <20180109115926.7e72673b@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYsyn-0000mX-RU for guix-devel@gnu.org; Tue, 09 Jan 2018 07:26:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYsyi-0000mx-Ue for guix-devel@gnu.org; Tue, 09 Jan 2018 07:26:09 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYsyi-0000mU-OQ for guix-devel@gnu.org; Tue, 09 Jan 2018 07:26:04 -0500 In-Reply-To: <20180109115926.7e72673b@scratchpost.org> (Danny Milosavljevic's message of "Tue, 9 Jan 2018 11:59:26 +0100") 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: Danny Milosavljevic Cc: Guix-devel Hi, Danny Milosavljevic skribis: > On Tue, 09 Jan 2018 10:05:34 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> We discussed some time ago the possibility to automatically instantiate >> services. Now that service types have default value, I think it=E2=80= =99s 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-ser= vice-type=E2=80=99 and >> an =E2=80=98mcron-service-type=E2=80=99 would be automatically added if = it=E2=80=99s not already >> there. > > Yes, as long as there's a way for the user to easily see what it instanti= ated (in the running system). =E2=80=98operating-system-services=E2=80=99 would still only lists services= that have been explicitly specified, but =E2=80=98guix system extension-graph=E2=80= =99 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 mc= ron-service by a custom mcron-service in /etc/config.scm but retain the mod= ified 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=E2=80=99.