Hi Peter,
Peter Polidoro <[email protected]> skribis:
> With guix session, the same environment could be entered with:
>
> guix session shell dev
> or
> guix session shell -f session.scm -s dev
>
> Where dev is the name of a session defined in a project-local
> session.scm file.
>
> Here is a minimal example of such a file:
>
> ;; session.scm
> ;;
> ;; Evaluates to a list of session records.
> ;; Module names and record names here are illustrative.
>
> (use-modules
> (guix session)) ; hypothetical module
>
> (list
> (session
> (name "dev")
>
> ;; guix time-machine -C channels.scm
> (channels-file "channels.scm")
>
> ;; shell -m manifest-dev.scm
> (manifests '("manifest-dev.scm"))
>
> ;; shell --container
> (container? #t)
>
> ;; --share="$PWD=/workspace"
I very much like the idea.
One thing that’s been discussed before is having (guix scripts shell)
expose an <environment> structure to represent everything that manifests
don’t represent: pure or container, shared directories, preserved
environment variables, etc. That could be the first step.
It would be similar to what you describe, except for the ‘time-machine’
bits.
And then maybe ‘guix session’ could build on top of that?
Thanks,
Ludo’.