# Guix shell not showing mentioned program inside the shell environment

**URL:** <https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232>\
**Category:** Guix\
**Created:** [February 8, 2024, 5:28am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232 "2024-02-08T05:28:48Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 8, 2024, 5:28am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/1 "2024-02-08T05:28:48Z")

</div>

Any time I do `guix shell meson` for example, I can’t run `meson` inside the `shell` environment, it is installed in the `gnu` store but I have to do full path to run it, like `/gnu/store/LONG-HASH-meson/bin/meson`.

This started happening after I started using `guix home` services like `home-environment-variables-service-type`, `home-zsh-service-type` etc, as I wanted to manage all my `dotfiles` using `guix home`.

I can’t find anything in my configuration files that could cause this issue.

Here my relevant `guix home` configuration,

```scheme
 (services
  (append
   (list
    (simple-service 'profile-env-vars-service
                    home-environment-variables-service-type
                    `(;; Sort hidden (dot) files first in `ls` listings
                      ("LC_COLLATE" . "C")

                      ("VISUAL" . "nvim")
                      ("EDITOR" . "nvim")
                      ("READER" . "zathura")
                      ("TERMINAL" . "st")
                      ("BROWSER" . "firefox")
                      ("VIDEO" . "mpv")
                      ("IMAGE" . "sxiv")
                      ("COLORTERM" . "truecolor")
                      ("OPENER" . "xdg-open")
                      ("PAGER" . "less")

                      ("LESSHISTFILE" . "-")
                      ("ANDROID_HOME" . "$XDG_DATA_HOME/android")
                      ("DOOMDIR" . "$XDG_CONFIG_HOME/doom")
                      ("EMACSDIR" . "$XDG_CONFIG_HOME/emacs")
                      ("XINITRC" . "$XDG_CONFIG_HOME/X11/xinitrc")
                      ("XSERVERRC" . "$XDG_CONFIG_HOME/X11/xserverrc")
                      ;; ("XAUTHORITY" . "XDG_RUNTIME_DIR") "/Xauthority"))
                      ;; ("XCURSOR_PATH" . "/usr/share/icons:$XDG_DATA_HOME/icons")
                      ("USERXSESSION" . "$XDG_CACHE_HOME/X11/xsession")
                      ("USERXSESSIONRC" . "$XDG_CACHE_HOME/X11/xsessionrc")
                      ("ALTUSERXSESSION" . "$XDG_CACHE_HOME/X11/Xsession")
                      ("INPUTRC" . "$XDG_CONFIG_HOME/readline/inputrc")
                      ("ERRFILE" . "$XDG_CACHE_HOME/X11/xsession-errors")
                      ("GNUPGHOME" . "$XDG_DATA_HOME/gnupg")
                      ("_JAVA_OPTIONS" . "-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java")
                      ("GTK2_RC_FILES" . "$XDG_CONFIG_HOME/gtk-2.0/gtkrc")
                      ;; ("ZDOTDIR" . "$XDG_CONFIG_HOME/zsh")
                      ("CARGO_HOME" . "$XDG_DATA_HOME/cargo")
                      ("RUSTUP_HOME" . "$XDG_DATA_HOME/rustup")
                      ;; ("GOPATH" . "$XDG_DATA_HOME/go")
                      ("RIPGREP_CONFIG_PATH" . "$XDG_CONFIG_HOME/ripgrep/ripgreprc")
                      ("XMONAD_CONFIG_HOME" . "$XDG_CONFIG_HOME/xmonad")
                      ("XMONAD_DATA_HOME" . "$XDG_DATA_HOME/xmonad")
                      ("XMONAD_CACHE_HOME" . "$XDG_CACHE_HOME/xmonad")
                      ("WGETRC" . "$XDG_CONFIG_HOME/wget/wgetrc")
                      ("PASSWORD_STORE_DIR" . "$XDG_DATA_HOME/password-store")
                      ("WINEPREFIX" . "$XDG_DATA_HOME/wineprefixes/default")
                      ("GEM_SPEC_CACHE" . "$XDG_CACHE_HOME/gem")
                      ("VAGRANT_HOME" . "$XDG_DATA_HOME/vagrant")
                      ("STARSHIP_CONFIG" . "$XDG_CONFIG_HOME/starship/starship.toml")
                      ("STARSHIP_CACHE" . "$XDG_CACHE_HOME/starship/cache")

                      ;; Add some things to $PATH (maybe integrate into other services?)
                      ("PATH" . ,(string-append "$HOME/.local/bin:"
                                                "$HOME/.local/bin/scripts:"
                                                "$HOME/.local/lib/:"
                                                "$HOME/.config/emacs/bin:"
                                                ;; "$GOPATH/bin:"
                                                ;; "/opt/flutter/:"
                                                ;; "/opt/flutter/bin:"
                                                ;; "$HOME/Applications:"
                                                "$CARGO_HOME:"
                                                "$CARGO_HOME/bin:"
                                                "$RUSTUP_HOME:"
                                                "$RUSTUP_HOME/toolchains/stable-x86_64-unknown-linux-gnu/bin:"
                                                "$RUSTUP_HOME/toolchains/nightly-x86_64-unknown-linux-gnu/bin:"
                                                "$PATH"))

                      ;; Make sure Flatpak apps are visible
                      ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")

                      ,@(if (equal? (gethostname) "MachineX")
                            ;; Required for steam on systems with Nvidia GPU
                            '(("QT_X11_NO_MITSHM" . "1")
                              ;; Required to mount external drive for container
                              ("GUIX_SANDBOX_EXTRA_SHARES" . "/home/apoorv/Games"))
                            '())

                      ;; Set Wayland-specific environment variables
                      ,@(if wayland?
                            '(("RTC_USE_PIPEWIRE" . "true")
                              ("SDL_VIDEODRIVER" . "wayland")
                              ("MOZ_ENABLE_WAYLAND" . "1")
                              ;; ("CLUTTER_BACKEND" . "wayland")
                              ;; ("ELM_ENGINE" . "wayland_egl")
                              ;; ("ECORE_EVAS_ENGINE" . "wayland-egl")
                              ("QT_QPA_PLATFORM" . "wayland-egl")
                              ("QT_QPA_PLATFORMTHEME" . "qt5ct")
                              ("QT_WAYLAND_DISABLE_WINDOWDECORATION" . "1")
                              ("XCURSOR_SIZE" . "24")
                              ;; ("XDG_CURRENT_DESKTOP" . "river")
                              ;; ("XDG_SESSION_DESKTOP" . "river")
                              ("XDG_CURRENT_SESSION_TYPE" . "wayland")
                              ("MOZ_ENABLE_WAYLAND" . "1")
                              ("GDK_BACKEND" . "wayland=x11")
                              ("_JAVA_AWT_WM_NONREPARENTING" . "1"))
                            '())))
    (service home-files-service-type
             `((".dwm/autostart.sh" ,(local-file "files/configs/.dwm/autostart.sh" #:recursive? #t))
               (".vimrc" ,(local-file "files/configs/vimrc"))
               (".guile" ,(local-file "files/configs/guile"))
               ;; (".Xdefaults" ,xdefaults)
               ;; (".local/share/gnupg/gpg.conf" ,gpg.conf)
               (".local/share/gnupg/gpg-agent.conf" ,gpg-agent-conf)))
    (service home-xdg-configuration-files-service-type
             `(("alacritty/alacritty.yml" ,(local-file "files/configs/alacritty/alacritty.yml"))
               ("htop/htoprc" ,(local-file "files/configs/htop/htoprc"))
               ("pcmanfm/default/pcmanfm.conf" ,(local-file "files/configs/pcmanfm/default/pcmanfm.conf"))
               ("gdb/gdbinit" ,(local-file "files/configs/gdb/gdbinit"))
               ("mpv/mpv.conf" ,(local-file "files/configs/mpv/mpv.conf"))
               ("nano/nanorc" ,(local-file "files/configs/nano/nanorc"))
               ("wget/wgetrc" ,(local-file "files/configs/wget/wgetrc"))))
    ;; Bash service
    (service home-bash-service-type
             (home-bash-configuration
              (guix-defaults? #t)
              (environment-variables
               `(("HISTTIMEFORMAT" . "%F %T ")
                 ("HISTSIZE" . "10000")
                 ("HISTFILESIZE" . "10000")
                 ("HISTCONTROL" . "ignoredups")
                 ;; ("HISTFILE" . ,(string-append (getenv "XDG_STATE_HOME") "/bash/history"))))
                 ("HISTFILE" . "$XDG_STATE_HOME/bash/history")))
              (aliases
               `(("rm" . "rm -iv")
                 ("cp" . "cp -iv")
                 ("mv" . "mv -iv")
                 ("config" .
                  ,(if guix-system?
                       `(string-append ,(file-append git "/bin/git") " --git-dir=/home/apoorv/repos/dotfiles --work-tree=/home/apoorv")
                       `("/usr/bin/git --git-dir=/home/apoorv/repos/dotfiles --work-tree=/home/apoorv")))
                 ("vim". "nvim")
                 ("ls" . "exa --icons")
                 ("ll" . "exa -lh --icons")
                 ("la" . "exa -lah --icons")
                 ("ld" . "exa -lah --group-directories-first --icons")
                 ;; ("mbsync" . ,(string-append "mbsync -c" (getenv "XDG_CONFIG_HOME") "/isync/mbsyncrc"))
                 ("mbsync" . "mbsync -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc")
                 ("ip" . "ip -color")
                 ("radeontop" . "radeontop --color")
                 ;; ("gdb" . ,(string-append "gdb -n -x" (getenv "XDG_CONFIG_HOME") "/gdb/init"))
                 ;; ("wget" . ,(string-append "wget --hsts-file=" (getenv "XDG_DATA_HOME") "/wget/wget-history"))
                 ("gdb" . "gdb -n -x $XDG_CONFIG_HOME/gdb/init")
                 ("wget" . "wget --hsts-file=\"$XDG_DATA_HOME/wget/wget-history\"")
                 ("diff" . "diff --color=always")
                 ("grep" . "grep --color=auto")
                 ("ydown" . "youtube-dl --embed-thumbnail --add-metadata")
                 ("ydownall" . "youtube-dl --download-archive downloaded.txt -iv")
                 ("ydownallaudio" . "youtube-dl --download-archive downloaded.txt -ixv")
                 ("ydownaudio" . "youtube-dl -f bestaudio --extract-audio --embed-thumbnail --add-metadata")
                 ("yformat" . "youtube-dl -F")
                 ("yplay" . ,(string-append "mpv --no-audio-display"
                                            " --term-osd force"
                                            " --term-osd-bar"
                                            " --term-osd-bar-chars [##-]"
                                            " --ytdl"
                                            " --ytdl-format=\"mp4[height<=?480] --ytdl-raw-options=playlist-start=1\""))
                 ("yy" . ,(string-append "mpv --really-quiet"
                                         " --autofit=25%"
                                         " --geometry=-25-40"
                                         " --ytdl"
                                         " --ytdl-format=\"mp4[height<=?1080]\""
                                         " --ytdl-raw-options=playlist-start=1"))
                 ("ssha" . "eval $(ssh-agent) && ssh-add")
                 ("wgu" . "sudo wg-quick up wg0")
                 ("wgd" . "sudo wg-quick down wg0")
                 ("pacin" . ,(string-append "pacman -Slq"
                                            " | "
                                            "fzf -m"
                                            " --preview"
                                            " 'cat <(pacman -Si {1})"
                                            " <(pacman -Fl {1}"
                                            " | "
                                            "awk \"{print $2}\")'"
                                            " | "
                                            " xargs -ro sudo pacman -S"))
                 ("paruin" . ,(string-append "paru -Slq"
                                             " | "
                                             "fzf -m"
                                             " --preview"
                                             " 'cat <(paru -Si {1})"
                                             " <(paru -Fl {1}"
                                             " | "
                                             " awk \"{print $2}\")'"
                                             " | "
                                             " xargs -ro paru -S"))
                 ("pacrem" . "pacman -Qq | fzf --multi --preview 'pacman -Qi {1}' | xargs -ro sudo pacman -Rns")
                 ("installed" . "grep -i installed /var/log/pacman.log")
                 ("mkgrub" . "sudo grub-mkconfig -o /boot/grub/grub.cfg")
                 ("es" . ,(string-append "find ~/.local/bin/scripts"
                                         " -type f"
                                         " | "
                                         "fzf --height 15"
                                         " --margin 1,60,1,1"
                                         " --header \"Edit scripts\""
                                         " --header-first"
                                         " | "
                                         "xargs -I{} nvim {}"))
                 ("ec" . ,(string-append "find ~/.config/"
                                         " -type f"
                                         " | "
                                         "fzf --height 15"
                                         " --margin 1,60,1,1"
                                         " --header \"Edit configs\""
                                         " --header-first"
                                         " | "
                                         " xargs -I{} nvim {}"))))
              (bash-profile
               (list
                (local-file "files/shell/bash/profile")))
              (bashrc
               (list
                ;; (computed-file "bashrc"
                ;; #~(begin
                ;; (use-modules (ice-9 textual-ports))
                ;; (call-with-output-file #$output
                ;; (lambda (port)
                ;; (put-string port (string-append "source " #$blesh "/share/blesh/ble.sh" "\n"))))))
                (mixed-text-file "bashrc"
                                 #~(string-append "source " #$(file-append (specification->package "blesh") "/share/blesh/ble.sh" "\n")))
                (local-file "files/shell/bash/prompt")
                (local-file "files/shell/functions")))))
    ;; Zsh service
    (service home-zsh-service-type
             (home-zsh-configuration
              (xdg-flavor? #t)
              (environment-variables
               `(("HISTFILE" . "$XDG_STATE_HOME/zsh/history")
                 ("HISTSIZE" . "10000")
                 ("SAVEHIST" . "10000")))
              (zshenv
               (list
                (local-file "files/shell/zsh/zshenv")))
              (zprofile
               (list
                (local-file "files/shell/zsh/zprofile")))
              (zshrc
               (list
                ;; (local-file "files/shell/zsh/config")
                (local-file "files/shell/zsh/completions")
                (mixed-text-file "zshrc"
                                 #~(string-append
                                    "# direnv hook zsh\n"
                                    "_direnv_hook() {\n"
                                    " trap -- '' SIGINT;\n"
                                    " eval \"$(\"" #$(file-append (specification->package "direnv")
                                                                   "/bin/direnv")"\" export zsh)\";\n"
                                                                   " trap - SIGINT;\n"
                                                                   "}\n"))
                (local-file "files/shell/zsh/direnv")
                (local-file "files/shell/zsh/fzf")
                (local-file "files/shell/zsh/keybinds")
                (local-file "files/shell/zsh/prompt")
                (local-file "files/shell/zsh/source")
                (local-file "files/shell/zsh/startup")
                (local-file "files/shell/functions")
                (mixed-text-file
                 "zshrc"
                 #~(string-append
                    "source "
                    #$(file-append (specification->package "zsh-syntax-highlighting")
                                   "/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" "\n")))
                (mixed-text-file
                 "zshrc"
                 #~(string-append
                    "source "
                    #$(file-append (specification->package "zsh-history-substring-search")
                                   "/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh" "\n")))
                (mixed-text-file
                 "zshrc"
                 #~(string-append
                    "fpath+=\"${0:A:h}"
                    #$(file-append (specification->package "zsh-completions")
                                   "share/zsh/site-functions/\"" "\n")))
                (mixed-text-file
                 "zshrc"
                 #~(string-append
                    "source "
                    #$(file-append (specification->package "zsh-autosuggestions")
                                   "/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" "\n")))
                (mixed-text-file
                 "zshrc"
                 #~(string-append
                    "source "
                    #$(file-append (specification->package "zsh-autopair")
                                   "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh")))))))

  ;; Other services below..

```

I can share more if needed.

Also, I have `nix` service enabled and after switching to using `guix home` for all my `dotfiles` management, `dmenu` (my program launcher) doesn’t show programs installed via `nix`. Before using `guix home` `dmenu` did use to show programs from `nix`

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 8, 2024, 4:51pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/2 "2024-02-08T16:51:50Z")

</div>

I had this issue when I started using guix home. I had to add this at the end of bash\_profile, so the default profile is .guix-profile and not .guix-home. I’m not sure if this is recommended or not but it works.

```bash
# Source guix-profile
export GUIX_PROFILE=~/.guix-profile
. $GUIX_PROFILE/etc/profile

```

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 8, 2024, 7:49pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/3 "2024-02-08T19:49:20Z")

</div>

I use `zsh` and I already have this in my `zshenv` file,

```scheme
    ;; Zsh service
    (service home-zsh-service-type
             (home-zsh-configuration
              (xdg-flavor? #t)
              (environment-variables
               `(("HISTFILE" . "$XDG_STATE_HOME/zsh/history")
                 ("HISTSIZE" . "10000")
                 ("SAVEHIST" . "10000")))
              (zshenv
               (list
                (local-file "files/shell/zsh/zshenv")))

```

This is the `files/shell/zsh/zshenv` file,

```sh
# Guix
GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

# Load the nix profile
if [-f "/run/current-system/profile/etc/profile.d/nix.sh"]; then
    source /run/current-system/profile/etc/profile.d/nix.sh
fi

if [-f "$HOME/.profile"]; then
    source "$HOME"/.profile
fi

xrdb -merge ~/.Xresources

```

But no luck.

Does it specifically have to be `~/.guix-profile`?

ATM if I do, `echo $GUIX_PROFILE`,

```sh
  echo $GUIX_PROFILE
/home/apoorv/.guix-home/profile

```

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 8, 2024, 8:16pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/4 "2024-02-08T20:16:28Z")

</div>

Yes this was a bit confusing for me $GUIX\_PROFILE is used as a temporary variable only to source the profiles and its final value is irrelevant ( this is my understanding, I might be wrong). guix-home does not source the .guix-profile/etc/profile by default. Maybe you could try with . .guix-profile/etc/profile and see if everything works.

My understanding is that guix-home works as a separate profile so you would have a minimum of two profiles if you use guix-home.

Does it specifically have to be `~/.guix-profile`?. I initially assumed that guix-home replaced this with guix-home but it does not seem to be the case and .guix-profile seems to be required.

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 8, 2024, 9:27pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/5 "2024-02-08T21:27:48Z")

</div>

I see, but `~/.guix-profile/etc/profile` is empty (as in everything is commented out),

```auto
  cat .guix-profile/etc/profile
# Source this file to define all the relevant environment variables in Bash
# for this profile. You may want to define the 'GUIX_PROFILE' environment
# variable to point to the "visible" name of the profile, like this:
#
# GUIX_PROFILE=/path/to/profile ; \
# source /path/to/profile/etc/profile
#
# When GUIX_PROFILE is undefined, the various environment variables refer
# to this specific profile generation.

```

I tried `. .guix-profile/etc/profile` then `guix shell meson` but still same issue.

One thing I would like to add (might be related) is that on this `guix` system I had `~/.zprofile` file created (its not mine as in I don’t checkout this file in my `dotfiles` repo and I have never used this either) its not managed by `guix` store though.

And it had,

```auto
# TODO: This causes problem with dmenu not being able to find
# any programs installed via guix-home so commenting it out for now.
# Merge search-paths from multiple profiles, the order matters.
# eval "$(guix package --search-paths \
# -p $HOME/.config/guix/current \
# -p $HOME/.guix-profile \
# -p /run/current-system/profile)"

# Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH

```

Now I am doing this,

```auto
              (zprofile
               (list
                (local-file "files/shell/zsh/zprofile")))

```

but I have commented out the `eval` section because if I uncomment it out none of the programs I have installed via `guix home` shows up in `dmenu`.

Though if I leave it uncommented but don’t mange this with `guix home` and just a regular file its fine everything works…

Very strange behavior.

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 8, 2024, 9:58pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/6 "2024-02-08T21:58:51Z")

</div>

I forgot to mention that setting guix/current manually is probably wrong (I have not seen this in the documentation or in any guix config).

Could you try removing this line? .

```auto
GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

```

And also try guix install so see in which profile it is installed.

I remember that I had this issue when I was using XFCE, bash\_profile was not sourced. I had to login to the command line (using agetty) and then launch xfce in bash\_profile . I’m using sway now and use the same method.

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 8, 2024, 11:55pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/7 "2024-02-08T23:55:23Z")

</div>

OK, so I updated my system both `guix home` and `guix system` and also commented this out,

```auto
# Guix
# GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

```

now `guix shell` works as expected. I un-commented it again to see if its the cause of the problem, and it is indeed.

BTW after commenting it out, `$GUIX_PROFILE`’s value is still same as before,

```auto
  echo $GUIX_PROFILE
/home/apoorv/.guix-home/profile

```

Strange that this and also this,

```auto
# TODO: This causes problem with dmenu not being able to find
# any programs installed via guix-home so commenting it out for now.
# Merge search-paths from multiple profiles, the order matters.
# eval "$(guix package --search-paths \
# -p $HOME/.config/guix/current \
# -p $HOME/.guix-profile \
# -p /run/current-system/profile)"

```

causes issue only when managed by `guix home` if I use regular file not managed by `guix home` it not an issue (AFAIR before I switch to using `guix home` they were there).

The `nix` problem remains though…

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 9, 2024, 1:32am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/8 "2024-02-09T01:32:45Z")

</div>

I think that the only difference between a regular guix configuration and guix-home is the files .profile .bash\_profile .bashrc ( and the zsh equivalent).  
I would try to find the differences and try to modify the guix-home files to generate the same result.

Explore sourcing manually different profiles and the same would go for nix.  
Also try sourcing .zprofile and .profile to see if there is any difference.

And confirm if the nix daemon is running (I’m not a nix user, I’m not sure what to do to fix it).

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 9, 2024, 9:46am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/9 "2024-02-09T09:46:23Z")

</div>

You mean like, disable the `home-zsh-service-type` and all, then see the default `"shell"` configuration files that `guix` provides vs what I have to see what `guix` provides by default?

The `.zshrc` and `.zshenv` are my own and is still same when I’m managing them with `guix home` though.

Same for `.bashrc`.

`.profile` file is not manged by me it is by default manged by `guix` and is a `symlink` to a store item.

For `nix` I think I should open a separate thread for it.

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 9, 2024, 3:04pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/10 "2024-02-09T15:04:20Z")

</div>

Yes, I did it like that, disabling all the shell services and looking for differences between the working configuration and what guix-home generates.

guix-home creates a .profile file, you should probably check your current file one created by `guix home container` . I’m using debian (and alpine) with guix-home, I’m not sure what would be different if you are using a Guix system.

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 12, 2024, 11:17am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/11 "2024-02-12T11:17:47Z")

</div>

OK, so I disabled `home-bash-service-type` and `home-zsh-service-type` and tried my `guix home` configuration in `guix home container`. It looks like only creates a `.profile` file, there is no `.bashrc` or `.zshrc` or anything else.

The content of the `.profile` file are,

```auto
MachineY% cat .profile
HOME_ENVIRONMENT=$HOME/.guix-home
. $HOME_ENVIRONMENT/setup-environment
$HOME_ENVIRONMENT/on-first-login

```

Similar to what I have on my regular system.

I also tried installing `Guix` on a `VM` everything default, didn’t even change my user `shell` to `zsh` and it generates a `.bashrc`, `.bash_profile` and `.zprofile` file by default,

Here are the contents of `.bashrc`

```auto
as@guix-virt ~$ cat .bashrc
# Bash initialization for interactive non-login shells and
# for remote shells (info "(bash) Bash Startup Files").

# Export 'SHELL' to child processes. Programs such as 'screen'
# honor it and otherwise use /bin/sh.
export SHELL

if [[$- != *i*]]
then
    # We are being invoked from a non-interactive shell. If this
    # is an SSH session (as in "ssh host command"), source
    # /etc/profile so we get PATH and other essential variables.
    [[-n "$SSH_CLIENT"]] && source /etc/profile

    # Don't do anything else.
    return
fi

# Source the system-wide file.
[-f /etc/bashrc] && source /etc/bashrc

alias ls='ls -p --color=auto'
alias ll='ls -l'
alias grep='grep --color=auto'

```

Here are the contents of `.bash_profile`,

```auto
as@guix-virt ~$ cat .bash_profile
# Set up Guix Home profile
if [-f ~/.profile]; then . ~/.profile; fi

# Honor per-interactive-shell startup file
if [-f ~/.bashrc]; then . ~/.bashrc; fi

# Merge search-paths from multiple profiles, the order matters.
eval "$(guix package --search-paths \
-p $HOME/.config/guix/current \
-p $HOME/.guix-profile \
-p /run/current-system/profile)"

# Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH

```

Here are the contents of `.zprofile`,

```auto
as@guix-virt ~$ cat .zprofile
# Honor system-wide environment variables
source /etc/profile

# Merge search-paths from multiple profiles, the order matters.
eval "$(guix package --search-paths \
-p $HOME/.config/guix/current \
-p $HOME/.guix-profile \
-p /run/current-system/profile)"

# Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH

```

There is no

```auto
GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

```

So I guess we can leave it. I think this is for foreign distributions only, like when you install `guix` on another distribution.

Though it does have (in both `.bash_profile` and `.zprofile`) this,

```auto
# Merge search-paths from multiple profiles, the order matters.
eval "$(guix package --search-paths \
-p $HOME/.config/guix/current \
-p $HOME/.guix-profile \
-p /run/current-system/profile)"

```

Though when I put this in `.zprofile` and manage it via `guix home` none of the programs installed via `guix home` shows up in `dmenu`.

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 12, 2024, 5:58pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/12 "2024-02-12T17:58:55Z")

</div>

Thanks for posting this, I’m using guix in a foreign distro but I’m sure this will be useful when I try guix system. I can’t look at your configuration in detail right now but I noticedthat .guix-profile is not sourced try adding this.

```auto
# Source guix-profile
export GUIX_PROFILE=~/.guix-profile
. $GUIX_PROFILE/etc/profile

```

You should probably try sourcing the profiles and then call dmenu from the terminal (I believe if you call it from a key or a launcher the shell from which it launches would be different)

- Source the profiles manually, then see if you can find your applications.
- To source guix-home you can use guix-home/setup-environment (I think).

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 12, 2024, 7:18pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/13 "2024-02-12T19:18:43Z")

</div>

No I meant, I remember when you install `guix` on a foreign distro, at the end of the installation (via script) it recommends to add this,

```auto
GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

```

Its where I got it from (I think) and is not needed on `guix` system (I guess).

Though if I uncomment this,

```auto
eval "$(guix package --search-paths \
-p $HOME/.config/guix/current \
-p $HOME/.guix-profile \
-p /run/current-system/profile)"

```

in my `.zprofile` file managed by `guix`, `dmenu` doesn’t show any programs installed via `guix home`, though all programs are accessible from `terminal`, like I can type `firefox` in terminal it launches.

Not sure, I’m gonna keep this commented, as it doesn’t seem to make any difference and the `guix shell` problem is fixed by removing this,

```auto
GUIX_PROFILE="/home/apoorv/.config/guix/current" . "$GUIX_PROFILE/etc/profile"

```

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [February 12, 2024, 7:42pm UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/14 "2024-02-12T19:42:39Z")

</div>

> No I meant, I remember when you install `guix` on a foreign distro, at the end of the installation (via script) it recommends to add this,

Good to know. At least its just a dmenu issue. I’m using rofi, and some applications do not show up (Milkytracker, emacs) but I’m still able to launch them.

---

<div class="post-metadata">

**Author:** ![apoorv569](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@apoorv569](https://forum.systemcrafters.net/u/apoorv569)\
**Post date:** [February 13, 2024, 5:13am UTC](https://forum.systemcrafters.net/t/guix-shell-not-showing-mentioned-program-inside-the-shell-environment/232/15 "2024-02-13T05:13:45Z")

</div>

Yea, I should open another post for this issue as well. `Guix` shell issue is fixed, I have marked your reply above as answer.
