Compare commits
No commits in common. "52452fccb5e0f8e76fcc434e760f84dce7e1d2ae" and "3d99f5704317a5a1750d39fd3fde36dfbf2fc730" have entirely different histories.
52452fccb5
...
3d99f57043
3 changed files with 6 additions and 26 deletions
|
@ -25,6 +25,7 @@
|
||||||
#useXkbConfig = true; # use xkbOptions in tty.
|
#useXkbConfig = true; # use xkbOptions in tty.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
|
|
BIN
nixos/flake.nix
BIN
nixos/flake.nix
Binary file not shown.
|
@ -38,7 +38,6 @@
|
||||||
vi = "nvim";
|
vi = "nvim";
|
||||||
vim = "nvim";
|
vim = "nvim";
|
||||||
nivm = "nvim";
|
nivm = "nvim";
|
||||||
nivim = "nvim";
|
|
||||||
|
|
||||||
tmux = "tmux -2";
|
tmux = "tmux -2";
|
||||||
ls = "ls -lah --color=auto";
|
ls = "ls -lah --color=auto";
|
||||||
|
@ -63,33 +62,13 @@
|
||||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||||
'';
|
'';
|
||||||
bashrcExtra = ''
|
bashrcExtra = ''
|
||||||
# PS1
|
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
||||||
USER_COLOR="\[\033[01;32m\]"
|
|
||||||
HOST_COLOR="\[\033[01;38;5;183m\]"
|
|
||||||
WHITE="\[\033[00m\]"
|
|
||||||
PURPLE="\[\033[01;34m\]"
|
|
||||||
RED="\[\033[38;5;124m\]"
|
|
||||||
FAILED="$RED⛔$WHITE"
|
|
||||||
|
|
||||||
set_prompt() {
|
|
||||||
BRANCH=$(git symbolic-ref -q --short HEAD 2>/dev/null)
|
|
||||||
if [ -n "$BRANCH" ]; then
|
|
||||||
BRANCH="$RED($WHITE$BRANCH$RED)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" == 0 ]; then
|
|
||||||
STATUS=""
|
|
||||||
else
|
|
||||||
STATUS="$FAILED"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PS1="╭╴$USER_COLOR\u$HOST_COLOR@\h$BRANCH$WHITE:$PURPLE\w$WHITE $STATUS\n╰╴$ "
|
|
||||||
}
|
|
||||||
|
|
||||||
PROMPT_COMMAND="set_prompt \$?; history -a"
|
|
||||||
|
|
||||||
[[ -d ~/.local/bin ]] && PATH+=":$HOME/.local/bin"
|
[[ -d ~/.local/bin ]] && PATH+=":$HOME/.local/bin"
|
||||||
|
|
||||||
|
USER_COLOR="01;32m"
|
||||||
|
HOST_COLOR="183m"
|
||||||
|
PS1="\[\033[$USER_COLOR\]\u\[\033[01;38;5;$HOST_COLOR\]@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ "
|
||||||
|
|
||||||
# source: https://stackoverflow.com/a/44232192
|
# source: https://stackoverflow.com/a/44232192
|
||||||
PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
|
PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue