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,
(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