Hi James,
On 6/5/25 02:08, James Thomas wrote:
> Thanks but sorry I couldn't be of more help.
I still appreciate your feedback.
> (Btw we have this in our workplace code of conduct: "The onus of
> clearing up any misunderstanding is on the one who's sent the longest
> message in that chain." ;-))
Well, I agree it would be reasonable for someone to look at my message
and just say "tl/dr". My goal is difficult to explain.
I'll try again, but don't feel obligated to reply if it still doesn't
make sense--because I may be just repeating myself.
Here is an operating-system definition on my desktop computer. This can
be deployed with just `guix system vm` (to local VM) or `guix deploy`
(to remote system). My special service is started and managed by Shepherd:
```
;; Example 1
(define my-os
(operating-system
(services
(cons* (service my-special-service-type)
%base-services))))
```
But my special service depends on other services too. For various
reasons I need to run it all in a container--**in a container that is
managed by Shepherd when deployed** (on local VM or remote system).
Thus, I would like to write an operating-system definition for the
container and add it to the parent:
```
;; Example 2
(define my-service-container
(operating-system
(services
(cons* (service my-special-service-type)
(service my-dependency-service-type)
%base-services))))
(define my-os
(operating-system
(services
(cons* (service container-service-type
(container my-service-container))
%base-services))))
```
The goal is to do the same `guix system vm` and `guix deploy` **with
`my-os`** and get a Shepherd-managed service-in-a-container on the
deployed system. Because `guix system vm` has a read-only store, the
entire `my-os` must be built before deployment and be available in the
store.
Note something very similar to this is already possible by placing an
operating-system definition in an oci-image, but it is quite inefficient
and uses Docker; see my previous message at
<https://lists.gnu.org/archive/html/help-guix/2025-05/msg00081.html>.
I think this is possible with Guix. Perhaps because Guix and Guile are
new to me I am not understanding the suggestions well enough and/or not
readily seeing how it could be implemented.
Thanks again,
Naranden