all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexis Simon <alexis.simon@runbox.com>
To: Unstable Horse <stable.master@unstable.horse>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: guix + fish shell help
Date: Mon, 23 Oct 2023 10:32:02 -0700	[thread overview]
Message-ID: <03bb8e64-5637-4218-85d8-296453454878@runbox.com> (raw)
In-Reply-To: <d9a581d157b47170f6ec8a079f88fd62b7a7e9fd.camel@unstable.horse>

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.


      reply	other threads:[~2023-10-23 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03bb8e64-5637-4218-85d8-296453454878@runbox.com \
    --to=alexis.simon@runbox.com \
    --cc=help-guix@gnu.org \
    --cc=stable.master@unstable.horse \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.