Refactor the entire configuration
With the release of the Nvidia 555 beta drivers and their improvements to the Wayland experience I've finally decided to return to NixOS with Hyprland again after 2 years of running Gentoo and Opensuse Tumbleweed on X11. So this is me committing the work done so far from the last couple of days. Future commits will be more incremental.
This commit is contained in:
parent
97c86fb014
commit
75b13ac379
72 changed files with 2045 additions and 196 deletions
46
users/hu/packages/zsh/config/conf.d/path.zsh
Executable file
46
users/hu/packages/zsh/config/conf.d/path.zsh
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
add_to_path() {
|
||||
if [ -d "$1" ] && [[ "$PATH" != *"$1"* ]]; then
|
||||
PATH="$PATH:$1"
|
||||
fi
|
||||
}
|
||||
|
||||
add_to_path "$HOME/.local/bin"
|
||||
|
||||
# Language package mangers
|
||||
if [ -n "$(command -v go)" ]; then
|
||||
export GOPATH="$HOME/.local/share/go"
|
||||
add_to_path "$HOME/.local/share/go/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$(command -v npm)" ]; then
|
||||
if [ -f "$HOME/.npmrc" ]; then
|
||||
if [ -z "$(grep prefix "$HOME/.npmrc")" ]; then
|
||||
npm config set prefix "$HOME/.local/share/npm"
|
||||
fi
|
||||
else
|
||||
npm config set prefix "$HOME/.local/share/npm"
|
||||
fi
|
||||
add_to_path "$HOME/.local/share/npm/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$(command -v cargo)" ]; then
|
||||
export CARGO_HOME="$HOME/.local/share/cargo"
|
||||
add_to_path "$HOME/.local/share/cargo/bin"
|
||||
fi
|
||||
|
||||
if [ -n "$(command -v pip3)" ] && [ -n "$(command -v virtualenv)" ]; then
|
||||
if [ ! -d "$HOME/.local/share/python3-venv" ]; then
|
||||
python3 -m venv "$HOME/.local/share/python3-venv"
|
||||
fi
|
||||
|
||||
if [ "$(grep "executable" "$HOME/.local/share/python3-venv/pyvenv.cfg" | awk '{print $3}')" \
|
||||
!= "$(realpath $(command -v python3))" ]; then
|
||||
python3 -m venv --upgrade "$HOME/.local/share/python3-venv"
|
||||
fi
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=true
|
||||
source "$HOME/.local/share/python3-venv/bin/activate"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue