mbox series

[bug#34948,0/3] Turn 'essential-services' into an <operating-system> field

Message ID 20190322172120.10974-1-ludo@gnu.org
Headers show
Series Turn 'essential-services' into an <operating-system> field | expand

Message

Ludovic Courtès March 22, 2019, 5:21 p.m. UTC
Hello Guix!

This is the solution that Arun and I were discussing:

  https://issues.guix.info/issue/28128#17

This series adds support for “self-referential records”: from
the definition of a thunked field, you can use ‘this-record’
to access the record that the field belongs to.

It then uses that to turn ‘essential-services’ into a thunked
field of <operating-system> rather than an inaccessible internal
procedure.

This allows us to remove all the #:container? flags from
(gnu system) and instead of (gnu system linux-container) simply
override ‘essential-services’ as needed.

Thoughts?

Thanks,
Ludo’.


Ludovic Courtès (3):
  records: Allow thunked fields to refer to 'this-record'.
  accounts: Add default value for the 'home-directory' field of
    <user-account>.
  system: Add 'essential-services' field to <operating-system>.

 doc/guix.texi                                |  8 ++-
 gnu/system.scm                               | 71 +++++++++-----------
 gnu/system/accounts.scm                      |  7 +-
 gnu/system/examples/bare-bones.tmpl          |  3 +-
 gnu/system/examples/beaglebone-black.tmpl    |  3 +-
 gnu/system/examples/desktop.tmpl             |  3 +-
 gnu/system/examples/docker-image.tmpl        |  3 +-
 gnu/system/examples/lightweight-desktop.tmpl |  3 +-
 gnu/system/install.scm                       |  3 +-
 gnu/system/linux-container.scm               | 69 ++++++++++++-------
 gnu/system/vm.scm                            | 13 ++--
 gnu/tests.scm                                |  5 +-
 gnu/tests/install.scm                        | 14 ++--
 guix/records.scm                             | 24 ++++++-
 tests/accounts.scm                           |  4 --
 tests/records.scm                            | 40 +++++++++++
 16 files changed, 169 insertions(+), 104 deletions(-)