Hi Chris!
Christopher Lemmer Webber <[email protected]> skribis:
> Would it be possible to make launching applications in Guix with minimum
> permissions even easier? Here's just a sketch of an idea.
>
> Borrowing from the new containerizing an application example in the
> manual...
>
> In my manifest.scm, what if instead of listing the browser package
> eolie, I listed the following:
>
> (define containerized-eolie
> (wrap-containerized eolie
> #:network? #t
> ;; Not sure if this line would be needed.
> #:other-packages (list coreutils nss-certs dbus)
> #:expose '("/etc/machine-id")
> #:share '(("/home/cwebber/tmp/shared-with-browser"
> . "/home/cwebber/shared"))
> #:share-env '("DISPLAY")))
>
> ;; now here's my list of packages
> (list emacs
> containerized-eolie
> ...)
>
> The idea here is that containerized-eolie actually generates a new
> package that "wraps" every binary that would be installed, as well as
> all common launchers, to use a script that actually launches them in a
> container with the above restrictions.
Definitely, it’s a great idea!
The ‘wrap-containerized’ procedure above wouldn’t be hard to write
((guix scripts pack) has something similar). It could use a trick as in
<https://lists.gnu.org/archive/html/help-guix/2018-01/msg00118.html> to
automatically determine some of the default file system mappings.
The next step I think would be to make a package transformation option
for that, so one could say:
guix install eolie --contained=eolie
or similar.
Ludo’.