[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Providing a Guix System images catalog.
From: |
Mathieu Othacehe |
Subject: |
Re: Providing a Guix System images catalog. |
Date: |
Tue, 26 May 2020 09:13:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hey,
>> That's pretty nice!
>
> +1!
Thanks to both of you for your quick feedback!
>> I wonder about how this composes; if I'd want to add say a guix-daemon
>> service to the bare-hurd, how would I do that?
>
> How about leaving the ‘operating-system’ field of <image> to #f or some
> default value, and then filling it in with the argument passed to ‘guix
> system’?
>
> Or better: at the API level, we’d look for an “image constructor” (or
> “image type”), not an image, where an image constructor is a procedure
> that takes an <operating-system> and returns an <image>. In practice,
> you’d wrap that in <image-type> with a ‘name’ field so you can still
> look them up by name.
This sounds fair. However, I would still like that:
* The operating-systems are stored elsewhere than in an "examples"
directory.
* The "image" command could use a default operating-system that we are
building with the CI, and making available on Guix website.
What about having a:
--8<---------------cut here---------------start------------->8---
gnu/system/images/hurd
├── hurd-bare-bones-os.scm
└── hurd.scm
--8<---------------cut here---------------end--------------->8---
hurd-bare-bones-os.scm would contain an operating-system with the
"image-type" set to the image contained in hurd.scm.
Conversely, the image in hurd.scm would point to the default
operating-system, that could be the one in hurd-bare-bones-os.scm.
Then, the user could type:
--8<---------------cut here---------------start------------->8---
guix system image hurd-disk-image
guix system disk-image hurd-bare-bones-os.scm
--8<---------------cut here---------------end--------------->8---
and have the same result.
We could also allow:
--8<---------------cut here---------------start------------->8---
guix system image hurd-disk-image --with-os hurd-bare-bones-os.scm
--8<---------------cut here---------------end--------------->8---
to override the default operating-system.
WDYT?
Thanks,
Mathieu