* guix + fish shell help
@ 2023-10-23 2:51 Alexis Simon
2023-10-23 9:47 ` Unstable Horse
0 siblings, 1 reply; 3+ messages in thread
From: Alexis Simon @ 2023-10-23 2:51 UTC (permalink / raw)
To: help-guix
Hi,
Is there any fish power-user using guix here who could help me figuring
out how to set up everything correctly?
My system:
- guix installed on Fedora
- fish installed through Fedora
- My path when I open a new shell, set up with the fish_add_path -U:
/home/alexis/.config/guix/current/bin /home/alexis/.guix-profile/bin
/home/alexis/.cargo/bin /usr/local/bin /usr/local/sbin /usr/bin
/usr/sbin /var/lib/snapd/snap/bin
The issue I have is that when I run guix shell, the temporary profile
gets added in the middle of things like so:
/home/alexis/.config/guix/current/bin /home/alexis/.guix-profile/bin
/home/alexis/.cargo/bin
/gnu/store/7d6s1wmjh2n1zmrwm72mq1rq0g9fgxga-profile/bin /usr/local/bin
/usr/local/sbin /usr/bin /usr/sbin /var/lib/snapd/snap/bin
I'd expect the custom path to go in front of the other paths.
What I guess is happening is that a new shell is started, the bin path
added to PATH, and then the fish shell started (which adds its own
additional paths).
If people could let me know how they've managed to set up fish properly
with guix this would be great.
Thanks!
Alexis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix + fish shell help
2023-10-23 2:51 guix + fish shell help Alexis Simon
@ 2023-10-23 9:47 ` Unstable Horse
2023-10-23 17:32 ` Alexis Simon
0 siblings, 1 reply; 3+ messages in thread
From: Unstable Horse @ 2023-10-23 9:47 UTC (permalink / raw)
To: Alexis Simon; +Cc: help-guix
On Sun, 2023-10-22 at 19:51 -0700, Alexis Simon wrote:
> If people could let me know how they've managed to set up fish
> properly
> with guix this would be great.
I use fish as my login shell on GuixSD and this is my config.fish:
--8<---------------cut here---------------start------------->8---
if status is-login
eval "$(guix package --search-paths \
-p ~/.config/guix/current \
-p ~/.guix-profile \
-p /run/current-system/profile)"
fish_add_path -P -p ~/.local/bin
fish_add_path -P -p /run/setuid-programs
end
--8<---------------cut here---------------end--------------->8---
guix package --search-paths takes care of all the environment variables
needed for your profile, including PATH. Keep in mind that it overrides
these variables, it doesn't append. So if fish is not your login shell,
then you will need to re-apply you custom paths.
Also, if it isn't your login shell, then the is-login check should
probably be removed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix + fish shell help
2023-10-23 9:47 ` Unstable Horse
@ 2023-10-23 17:32 ` Alexis Simon
0 siblings, 0 replies; 3+ messages in thread
From: Alexis Simon @ 2023-10-23 17:32 UTC (permalink / raw)
To: Unstable Horse; +Cc: help-guix
Thanks so much for the pointers, not sure I understand all the
intricacies but managed to solve all my issues with this (a bit more
manual as I was getting errors with the eval part)
--8<---------------cut here---------------start------------->8---
if status is-interactive
╎ # Commands to run in interactive sessions can go here
╎ # >>> conda initialize >>>
╎ # !! Contents within this block are managed by 'conda init' !!
╎ if test -f /home/alexis/opt/conda/bin/conda
╎ ╎ eval /home/alexis/opt/conda/bin/conda "shell.fish" "hook" $argv
| source
╎ end
╎
╎ if test -f "/home/alexis/opt/conda/etc/fish/conf.d/mamba.fish"
╎ ╎ source "/home/alexis/opt/conda/etc/fish/conf.d/mamba.fish"
╎ end
╎ # <<< conda initialize <<<
╎ fish_add_path -P -p ~/.cargo/bin
╎ fish_add_path -P -p ~/.nix-profile/bin
╎ fish_add_path -P -p ~/.guix-profile/bin
╎ fish_add_path -P -p ~/.config/guix/current/bin
end
--8<---------------cut here---------------end--------------->8---
Now the guix shell path is correctly prepended to my path!
Best,
Alexis
On 23/10/2023 02:47, Unstable Horse wrote:
> On Sun, 2023-10-22 at 19:51 -0700, Alexis Simon wrote:
>
>> If people could let me know how they've managed to set up fish
>> properly
>> with guix this would be great.
>
> I use fish as my login shell on GuixSD and this is my config.fish:
>
> --8<---------------cut here---------------start------------->8---
> if status is-login
> eval "$(guix package --search-paths \
> -p ~/.config/guix/current \
> -p ~/.guix-profile \
> -p /run/current-system/profile)"
>
> fish_add_path -P -p ~/.local/bin
> fish_add_path -P -p /run/setuid-programs
> end
> --8<---------------cut here---------------end--------------->8---
>
> guix package --search-paths takes care of all the environment variables
> needed for your profile, including PATH. Keep in mind that it overrides
> these variables, it doesn't append. So if fish is not your login shell,
> then you will need to re-apply you custom paths.
>
> Also, if it isn't your login shell, then the is-login check should
> probably be removed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-26 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 2:51 guix + fish shell help Alexis Simon
2023-10-23 9:47 ` Unstable Horse
2023-10-23 17:32 ` Alexis Simon
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.