guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiles/manifests-related command line interface enhancements


From: Pierre Neidhardt
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Thu, 24 Oct 2019 20:16:53 +0200

Danny Milosavljevic <address@hidden> writes:

> Hi Pierre,
>
> On Thu, 24 Oct 2019 11:32:55 +0200
> Pierre Neidhardt <address@hidden> wrote:
>
>> As you suggested `guix-activate` could be a shell function that's
>> defined in /etc/profile or anywhere appropriate.
>
> Yes, but what's the advantage of that as opposed to just doing it like anyone
> else does it: Just start a new shell.

If I understand correctly, you are saying we should use `guix
environment...` everywhere.

Currently, this does not support multiple manifests, so it does not
compose.  But that's an issue that could (should?) be fixed, as we are
discussing below.

There can be some benefits in editing the current environment for the
running application.
Say with EXWM, if I want to enable a profile for the running
instance of Emacs.

Moreover, I believe this does not work on login, e.g. from your
~/.bash_profile.

I'd like to streamline the way profiles are loaded, i.e. it should work
the same way on login and from a random shell.

> I for one *like* it that the shell environment can't be
> modified by random programs.

You mean that you prefer running sub-shells instead of changing the
current shell environment?

>>- The inverse command, =guix deactivate /path/to/profile=.
>> This can be useful to deactivate a profile that was activated during login.
>
> That is not composable and sounds like a HUGE effort for what would otherwise
> one "exit" command.

Why isn't it composable?

It does not seem too hard: if I'm not mistaken, it boils down to
removing all environment entries that match a given profile.

This could be brittle though and would need testing.

An alternative to this, once we have the ability to compose manifests
from command line, is to simply start a new shell with the desired
manifests.

With a good shell (e.g. Eshell) it's easy to complete against a list of
manifests and filter out the few that we don't want.

We could also leverage Emacs-Guix for that.

>>- All commands that accept manifests should be able to compose manifests
>>  by passing multiple =--manifest FILE= options.
>
> Hmm that would be nice!

This simple feature would fix many of the current limitations of Guix.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]