Hi Peter,
Thanks for working on this. I like the general idea, I have a proposal for an improvement, though. There is a use case that the current guix shell --container cannot accompany and that is when you want to change the configuration of the container itself, ie. the network namespace, users, groups... I don't think it would be easy to provide all of those options on the CLI. Peter Polidoro <[email protected]> writes: > > ;; shell --container > (container? #t) So instead of this, I would propose something like `type` field, whose accepted values for now could be something like - 'plain / 'normal - 'pure - 'container And one that could be extended in the future: ``` (container (emulate-fhs? #t) ; Default is #f (cwd? #t) ; Default is #t (symlinks (list ...)) ;; I am imagining there will be just one mount object, ;; that has ro? field, but for users it might be easier ;; to get easier constructors. (mounts (list (session-rw-mount "from" "to") (session-ro-mount "from" "to")))) ``` The specified options should probably be implemented in the first version. They all do map to currently existing options. Then it could be extended to allow what I proposed later. Imo this is going to scale better rather than having emulate-fhs?, no-cwd? and mounts separately in the root of `session` itself. Those options apply only to container afterall and there can be a handful of new options that would apply only to containers. I think this could potentially also work as more extensible mechanism where the 'session' could be made into something else than a shell, ie. an app where if you ran the session, it would start an application instead of a shell. Regards Rutherther
