From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7OBT-0004N7-6w for guix-patches@gnu.org; Fri, 22 Mar 2019 13:42:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7O0U-0004qL-Dw for guix-patches@gnu.org; Fri, 22 Mar 2019 13:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41114) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7O0U-0004q1-3J for guix-patches@gnu.org; Fri, 22 Mar 2019 13:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h7O0T-0001fj-Uk for guix-patches@gnu.org; Fri, 22 Mar 2019 13:31:01 -0400 Subject: [bug#28128] [PATCH 2/2] scripts: system: Support container network sharing. In-Reply-To: <20170817191334.26269-1-mail@cbaines.net> Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190313093610.1071-1-arunisaac@systemreboot.net> <20190313093610.1071-3-arunisaac@systemreboot.net> <87va0n80u5.fsf@gnu.org> <874l80tw60.fsf@gnu.org> Date: Fri, 22 Mar 2019 18:29:54 +0100 Message-ID: <871s2y7r71.fsf@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: 28128@debbugs.gnu.org Hi Arun & Chris, Arun Isaac skribis: >> It=E2=80=99s not easily possible, and I think it would be a bad idea: if= every >> service has access to every =E2=80=98operating-system=E2=80=99 field, th= at gives you >> more flexibility, but it=E2=80=99s also much harder to reason about what >> happens, compared to the current extension graph (the NixOS =E2=80=9Cmod= ule=E2=80=9D >> system works like that: every service can access every bit of the whole >> configuration, but IMO that makes it quite hard to understand.) > > OK, I understand. Just out of curiosity: Why do we have special > operating-system fields like host-name, hosts-file, etc. instead of just > having services like host-name-service-type, hosts-file-service-type, > etc.? Doesn't giving special status to these operating-system fields > complicate things? For example, if we only had a hosts-file-service-type > instead of a hosts-file operating-system field, we wouldn't have the > problem that /etc/hosts could only be created from within > essential-services. You=E2=80=99re right, to some extent those fields complicate things (most of them were here before the service infrastructure, though.) OTOH I find it convenient to have a high-level view of the OS. >> What could be useful is =E2=80=9Cself-referential=E2=80=9D records, wher= e a field can >> refer to the record it belongs do. So we=E2=80=99d do: >> >> (define-record-type* >> ;; =E2=80=A6 >> (services operating-system-services >> (self-referential? #t) (default essential-services))) >> >> whereby =E2=80=98essential-services=E2=80=99 would be passed the >> record somehow. >> >> That needs more thought=E2=80=A6 > > OK, I'll wait. I didn=E2=80=99t mean to block you though because it was just an idea witho= ut code=E2=80=A6 but in the meantime I=E2=80=99ve sent code to . It turned out to be easier than I thought! Ludo=E2=80=99.