On Sun, Dec 14, 2025 at 07:25:36AM -0500, Peter Polidoro wrote:
> I really like your proposal, thanks! What if we split 
> <environment> into two records:
> 
> ;; <environment> record for ‘guix shell’.
> (define-record-type* <environment>
>   environment make-environment environment?
> 
>   ...
>
>   ;; Equivalent to --pure.
>   (pure?                 environment-pure?
>                          (default #f))
> 
>   ...
> 
>   ;; Container runtime configuration.
>   ;; #f means “not a container”; a <container-environment> means 
>   “--container”.
>   (container             environment-container
>                          (default #f)))

As a small note, I don't think container and pure make any sense
together, so maybe they should be set in the same field to make invalid
states unrepresentable[1]? For example, an `isolation` field that is either
#f for nothing, 'pure for --pure or a <container-environment> for
--container?

- Saku

[1]: Well, at least harder to represent by accident. Since we don't have
static types, nothing prevents the isolation field from being set to a
mixed list of strings and numbers or something else nonsensical.

Attachment: signature.asc
Description: PGP signature

Reply via email to