diff --git a/home/.chezmoiscripts/universal/run_onchange_after_04-environment-profile.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_04-environment-profile.sh.tmpl index f41d530b..280aee36 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_04-environment-profile.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_04-environment-profile.sh.tmpl @@ -1,11 +1,14 @@ {{- if (eq .host.distro.family "linux") -}} #!/usr/bin/env bash # @file Global Profile Setup -# @brief Configures `/etc/environment` to include environment variables that should be applied globally +# @brief Configures `/etc/environment` to include environment variables that should be applied globally and adds a `/etc/zshenv` file # @description # This script modifies the `/etc/environment` file on Linux devices to include: # # * `export QT_STYLE_OVERRIDE=kvantum-dark` which is required for the Linux GNOME / KDE themeing that relies on Kvantum. +# +# It also copies the `~/.config/shell/exports.sh` file to `/etc/zshenv` so that non-interactive ZSH sessions have all of the same +# environment PATH variables as interactive sessions. This was initially required to make Cakebrew work on macOS. {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} @@ -20,4 +23,8 @@ else logg info 'Added QT_STYLE_OVERRIDE to /etc/environment' fi +### Ensure /etc/zshenv is populated +# No equivalent type of file for Bash +logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/shell/exports.sh to /etc/zshenv" && sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/exports.sh" /etc/zshenv + {{ end -}} diff --git a/home/dot_config/shell/exports.sh.tmpl b/home/dot_config/shell/exports.sh.tmpl index 40788ee2..b86502f3 100644 --- a/home/dot_config/shell/exports.sh.tmpl +++ b/home/dot_config/shell/exports.sh.tmpl @@ -5,6 +5,10 @@ # This script is included by `~/.bashrc` and `~/.zshrc` to provide environment variables that play harmoniously with # the default Install Doctor configurations. +### Language / Fonts +export LANG="en_US" +export LC_ALL="en_US.UTF-8" + ### Licensing export ACCEPT_EULA=y diff --git a/software.yml b/software.yml index 3d2df639..73e384c0 100644 --- a/software.yml +++ b/software.yml @@ -5084,6 +5084,7 @@ softwarePackages: _github: https://github.com/keybase/client _home: https://keybase.io/ _name: Keybase + _post:cask: if [ ! -f /usr/local/bin/keybase ] && [ -f /Applications/Keybase.app/Contents/SharedSupport/bin/keybase ]; then echo "Fixing missing keybase executable symlink permission issue" && sudo ln -s /Applications/Keybase.app/Contents/SharedSupport/bin/keybase /usr/local/bin/keybase; fi _when:ansible: '! test -f /opt/keybase/Keybase' _when:cask: '! test -d /Applications/Keybase.app && ! test -d $HOME/Applications/Keybase.app' ansible: professormanhattan.keybase