From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eCk5GzLFLGJ5JAEAgWs5BA (envelope-from ) for ; Sat, 12 Mar 2022 17:07:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oJXFEzLFLGKNTwEAG6o9tA (envelope-from ) for ; Sat, 12 Mar 2022 17:07:14 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0B7A33D24B for ; Sat, 12 Mar 2022 17:07:14 +0100 (CET) Received: from localhost ([::1]:41416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nT4Gv-0002JR-0o for larch@yhetil.org; Sat, 12 Mar 2022 11:07:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT4Gk-0002J7-Hm for bug-guix@gnu.org; Sat, 12 Mar 2022 11:07:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nT4Gk-0000tD-9O for bug-guix@gnu.org; Sat, 12 Mar 2022 11:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nT4Gk-0005cb-54 for bug-guix@gnu.org; Sat, 12 Mar 2022 11:07:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#54354: [BUG] guix home: on foreign distro, ~/.bash_profile is not initialized Resent-From: florhizome Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 12 Mar 2022 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54354 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 54354@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164710116521539 (code B ref -1); Sat, 12 Mar 2022 16:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Mar 2022 16:06:05 +0000 Received: from localhost ([127.0.0.1]:40671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT4Fo-0005bK-7h for submit@debbugs.gnu.org; Sat, 12 Mar 2022 11:06:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:43390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT1T8-0000o2-Jl for submit@debbugs.gnu.org; Sat, 12 Mar 2022 08:07:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT1T8-000338-FJ for bug-guix@gnu.org; Sat, 12 Mar 2022 08:07:38 -0500 Received: from mout02.posteo.de ([185.67.36.66]:59291) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT1T4-00030Z-W6 for bug-guix@gnu.org; Sat, 12 Mar 2022 08:07:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8B555240103 for ; Sat, 12 Mar 2022 14:07:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1647090451; bh=pX11BQvdMcTGEpOL1sQxPD3mp8jp7BM3Nc+nL7GqHNM=; h=From:To:Subject:Date:From; b=HYGr6dHKbpN2YvnIjlMtju3DG9lJh4omvNrrTkwYrNQ0x6Xp9KxZf39HIgYfOI8DS o/fUBYGXlX2JgBEdO9kt4u60M+NxvJOoJZIwVWV/MYP3EUzS2LhYR0T5tXmRaG2ukz HJgWKouqOCnS79Dy7UGks88A2d0R24JOraDPjI2fJm+Pj+qOaC3K7Mhz+zYIsgtvmM I7ZXEaj7dJ0Aqlcul9URiMW1tXRHrvjMgVwv4CaUG3Nt7sG3XYM/IkipkMmLFjoaHq rpSJBB+h/SdSLMruS1i2saI2MyQI4dylccHAyvhmqnypa2gLfi2k2tFEkw0lXNfR1w hJ7PqU4fY1OOA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KG34L3pXKz6tmx for ; Sat, 12 Mar 2022 14:07:30 +0100 (CET) From: florhizome Date: Sat, 12 Mar 2022 13:07:29 +0000 Message-ID: <878rtfjp4e.fsf@thinkpad-manjaro.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=florhizome@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_DOTEDU=1.246 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 12 Mar 2022 11:06:02 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647101234; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=/37KjiRXf52YYMmMhMMt0z/qAApYH8jZlZkvBeUixgs=; b=FZZP+/fCx3ml4qYBzx3poVcbRHJkAE+k/Yat2EPB6GJoRMkfH+THxZvgBqQEaEAdIN6/50 7m7/87fvhBD68OO3qsmSAU2Ccfo+lInTOWmVvS9SF+Mr0R+WhdA79jJ6lhqjfNI3EqxsJ+ UPYMB8AAnlHuzR9SMJQs/X8NqVS4nXiHeOH1CGNzJEkVzZh3obLE2jHLQhstCcw4Ti62QE nimRBJpTwcPgyBAyQog935hD+q4K0gPaCNsjiWva6d5ic3c2QRAKcLdYrrow/Zxg6RDcSf ZUAnwmghv1Esdk4R8zpVD1iDiVnNHsPn0mqPy3/XVL/TEZjgcKPEVeAIl1YVWg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647101234; a=rsa-sha256; cv=none; b=sKybd+GI3OlUW1iRwNwipNPfh5s7cwvRrpYIw6Sfpx2uj6SHoJEwcSL/OU2L/LmuVE3Iu0 UVBLE/0NoAkn5ChJK/skjBUxbwcKdnprXLQVb2bHIfB8g8cDplZ0iOgw65m2remRXUN23K xIpcUAqqyBdKwe4YkqdCeRklrjKVLDwp9hAGwv9AjgXKPA5U9OgLj0o7pugDoBfFytZTs0 RufzQKvOQKimOiPCH3qvKL6a4seLNytb3c/W9Lg+P+iXhlP8XUVve37ZvUCR4zOqTpZbmX fzImOgl7ArLkCVypaAwEcJiQN+xa7gEpxW7NyDpF9sLtocjRK3e8Ld8Ic2SzSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=HYGr6dHK; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=HYGr6dHK; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0B7A33D24B X-Spam-Score: 4.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2KWxs6AWkpWv --=-=-= Content-Type: text/plain Hi guix' ! I have been trying to use guix home on my foreign distro partition (manjaro); especially in order to set up additional profiles from there, but my .bash_profile generated by guix doesn't seem to be evaluated at all. To describe the actual issue finally: None of the things that should happen through .bash_profile seem to happen at the moment (it's just about different environment variables that will not be set up.), but after running bash --login in my terminal-emulator everything is as anticipated so my guess is that .bash_profile actually isn't evaluated at all after login. I'm happy to hear other suggestions and especially solutions. I will attach the file that I use for home configuration, as well as the current resulting .bashrc, .bash_profile and .profile files. I'm aware that there is duplicated code by the generated aliases in .bashrc and that the prompt customization for guix profiles added by the "guix-defaults?" field does not work due to other related code that comes afterwards but I'm not sure it's related to that main issue. I did the original set up using "guix home import" which seems to have improved since I tried last in december last year when the generated file didn't work at all. Manjaro has a lot of stuff in it's .bashrc that i didn't want to override, and maybe there are more cases of duplication there that I don't know about what harm they might introduce. Greetings, Florian --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=home-configuration.scm Content-Description: guix home declaration (use-modules (gnu home) (gnu packages) (gnu packages base) (gnu services) (guix gexp) (gnu home services shells)) (define %enable-extra-profiles (plain-file "enable-profiles" "for i in $GUIX_EXTRA_PROFILES/*; do profile=$i/$(basename \"$i\") if [ -f \"$profile\"/etc/profile ]; then GUIX_PROFILE=\"$profile\" . \"$GUIX_PROFILE\"/etc/profile fi unset profile done")) (home-environment (services (list (service home-bash-service-type (home-bash-configuration (environment-variables '(("GUIX_EXTRA_PROFILES" . "/home/flo/.extra-profiles") ;;("ALTERNATE_EDITOR" . "\"\"") ("EDITOR" . "\"emacsclient -nw -q\"") ("VISUAL" . "\"emacsclient -c -a \"\"\"") ("GIT_EDITOR" . "\"emacs -nw -q\""))) (aliases '(("cp" . "cp -i") ("df" . "df -h") ("egrep='egrep --colour" . "auto") ("fgrep='fgrep --colour" . "auto") ("free" . "free -m") ("grep='grep --colour" . "auto") ("ls='ls --color" . "auto") ("more" . "less") ("np" . "nano -w PKGBUILD"))) (bashrc (list (local-file "/home/flo/.config/guix/home/.bashrc" "bashrc"))) (bash-profile (list %enable-extra-profiles)) (bash-logout (list (local-file "/home/flo/.config/guix/home/.bash_logout" "bash_logout")))))))) --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=.profile Content-Description: resulting "~/.profile" HOME_ENVIRONMENT=$HOME/.guix-home . $HOME_ENVIRONMENT/setup-environment $HOME_ENVIRONMENT/on-first-login --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=.bashrc Content-Description: resulting "~/.bashrc" alias cp="cp -i" alias df="df -h" alias egrep='egrep --colour="auto" alias fgrep='fgrep --colour="auto" alias free="free -m" alias grep='grep --colour="auto" alias ls='ls --color="auto" alias more="less" alias np="nano -w PKGBUILD" # 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. if [[ -e /etc/bashrc ]]; then source /etc/bashrc fi # Adjust the prompt depending on whether we're in 'guix environment'. if [ -n "$GUIX_ENVIRONMENT" ] then PS1='\u@\h \w [env]\$ ' else PS1='\u@\h \w\$ ' fi alias ls='ls -p --color=auto' alias ll='ls -l' alias grep='grep --color=auto' # # ~/.bashrc # [[ $- != *i* ]] && return colors() { local fgc bgc vals seq0 printf "Color escapes are %s\n" '\e[${value};...;${value}m' printf "Values 30..37 are \e[33mforeground colors\e[m\n" printf "Values 40..47 are \e[43mbackground colors\e[m\n" printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" # foreground colors for fgc in {30..37}; do # background colors for bgc in {40..47}; do fgc=${fgc#37} # white bgc=${bgc#40} # black vals="${fgc:+$fgc;}${bgc}" vals=${vals%%;} seq0="${vals:+\e[${vals}m}" printf " %-9s" "${seq0:-(default)}" printf " ${seq0}TEXT\e[m" printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" done echo; echo done } [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion # Change the window title of X terminals case ${TERM} in xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' ;; screen*) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' ;; esac use_color=true # Set colorful PS1 only on colorful terminals. # dircolors --print-database uses its own built-in database # instead of using /etc/DIR_COLORS. Try to use the external file # first to take advantage of user additions. Use internal bash # globbing instead of external grep binary. safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM match_lhs="" [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ && match_lhs=$(dircolors --print-database) [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true if ${use_color} ; then # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 if type -P dircolors >/dev/null ; then if [[ -f ~/.dir_colors ]] ; then eval $(dircolors -b ~/.dir_colors) elif [[ -f /etc/DIR_COLORS ]] ; then eval $(dircolors -b /etc/DIR_COLORS) fi fi if [[ ${EUID} == 0 ]] ; then PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' else PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' fi alias ls='ls --color=auto' alias grep='grep --colour=auto' alias egrep='egrep --colour=auto' alias fgrep='fgrep --colour=auto' else if [[ ${EUID} == 0 ]] ; then # show root@ when we don't have colors PS1='\u@\h \W \$ ' else PS1='\u@\h \w \$ ' fi fi unset use_color safe_term match_lhs sh alias cp="cp -i" # confirm before overwriting something alias df='df -h' # human-readable sizes alias free='free -m' # show sizes in MB alias np='nano -w PKGBUILD' alias more=less xhost +local:root > /dev/null 2>&1 complete -cf sudo # Bash won't get SIGWINCH if another process is in the foreground. # Enable checkwinsize so that bash will check the terminal size when # it regains control. #65623 # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) shopt -s checkwinsize shopt -s expand_aliases # export QT_SELECT=4 # Enable history appending instead of overwriting. #139609 shopt -s histappend # # # ex - archive extractor # # usage: ex ex () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1;; *.7z) 7z x $1 ;; *) echo "'$1' cannot be extracted via ex()" ;; esac else echo "'$1' is not a valid file" fi } # BEGIN_KITTY_SHELL_INTEGRATION if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi # END_KITTY_SHELL_INTEGRATION --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=.bash_profile Content-Description: resulting "~/.bash_profile" file # Setups system and user profiles and related variables # /etc/profile will be sourced by bash automatically # Setups home environment profile if [ -f ~/.profile ]; then source ~/.profile; fi # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then source ~/.bashrc; fi for i in $GUIX_EXTRA_PROFILES/*; do profile=$i/$(basename "$i") if [ -f "$profile"/etc/profile ]; then GUIX_PROFILE="$profile" . "$GUIX_PROFILE"/etc/profile fi unset profile done export GUIX_EXTRA_PROFILES=/home/flo/.extra-profiles export EDITOR="emacsclient -nw -q" export VISUAL="emacsclient -c -a """ export GIT_EDITOR="emacs -nw -q" --=-=-=--