feat: flakes and shells are now appeneded to the front of the zsh prompt, provided NIX_PROJECT_SHELL
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
nmap
|
nmap
|
||||||
file
|
file
|
||||||
freerdp
|
freerdp
|
||||||
|
bitwarden-desktop
|
||||||
|
bitwarden-cli
|
||||||
];
|
];
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
@@ -62,6 +64,19 @@
|
|||||||
oh-my-zsh.enable = true;
|
oh-my-zsh.enable = true;
|
||||||
oh-my-zsh.theme = "agnoster";
|
oh-my-zsh.theme = "agnoster";
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
alias nix-shell='nix-shell --run $SHELL'
|
||||||
|
nix() {
|
||||||
|
if [[ $1 == "develop" ]]; then
|
||||||
|
shift
|
||||||
|
command nix develop -c $SHELL "$@"
|
||||||
|
else
|
||||||
|
command nix "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$NIX_PROJECT_SHELL" ]; then
|
||||||
|
PROMPT="($NIX_PROJECT_SHELL)$PROMPT"
|
||||||
|
fi
|
||||||
# Only start Zellij if we're in an interactive terminal
|
# Only start Zellij if we're in an interactive terminal
|
||||||
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
|
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
|
||||||
exec zellij
|
exec zellij
|
||||||
|
|||||||
Reference in New Issue
Block a user