[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28128] [PATCH 2/2] scripts: system: Support container network shari
From: |
Arun Isaac |
Subject: |
[bug#28128] [PATCH 2/2] scripts: system: Support container network sharing. |
Date: |
Thu, 21 Mar 2019 15:47:35 +0530 |
> It’s not easily possible, and I think it would be a bad idea: if every
> service has access to every ‘operating-system’ field, that gives you
> more flexibility, but it’s also much harder to reason about what
> happens, compared to the current extension graph (the NixOS “module”
> 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.
> What could be useful is “self-referential” records, where a field can
> refer to the record it belongs do. So we’d do:
>
> (define-record-type* <operating-system>
> ;; …
> (services operating-system-services
> (self-referential? #t) (default essential-services)))
>
> whereby ‘essential-services’ would be passed the <operating-system>
> record somehow.
>
> That needs more thought…
OK, I'll wait.
Thanks!
signature.asc
Description: PGP signature
[bug#28128] [PATCH 1/2] shepherd: Move nscd-socket to (gnu system file-systems)., Arun Isaac, 2019/03/13