summaryrefslogtreecommitdiffstats
path: root/tv/2configs/bash/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-09-12 12:56:39 +0200
committertv <tv@krebsco.de>2023-09-13 16:23:38 +0200
commitfbd485cd86c7e9984819357398f912a2d5510845 (patch)
treee1a9e2eedacfa25018d6b0eef3f4628a4d503ebc /tv/2configs/bash/default.nix
parent5370e0485788224126861e076110ac705013d2de (diff)
tv: emigrate
Diffstat (limited to 'tv/2configs/bash/default.nix')
-rw-r--r--tv/2configs/bash/default.nix67
1 files changed, 0 insertions, 67 deletions
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix
deleted file mode 100644
index 57801d96..00000000
--- a/tv/2configs/bash/default.nix
+++ /dev/null
@@ -1,67 +0,0 @@
-with import ./lib;
-{ config, pkgs, ... }: {
- programs.bash = {
- interactiveShellInit = /* sh */ ''
- HISTCONTROL='erasedups:ignorespace'
- HISTSIZE=900001
- HISTFILESIZE=$HISTSIZE
- HISTTIMEFORMAT=
-
- shopt -s checkhash
- shopt -s histappend histreedit histverify
- shopt -s no_empty_cmd_completion
- complete -d cd
-
- case $UID in
- ${shell.escape (toString config.krebs.users.tv.uid)})
- if test ''${SHLVL-1} = 1 && test -n "''${DISPLAY-}"; then
- _CURRENT_DESKTOP_NAME=''${_CURRENT_DESKTOP_NAME-$(
- ${pkgs.xorg.xprop}/bin/xprop -notype -root \
- 32i _NET_CURRENT_DESKTOP \
- 8s _NET_DESKTOP_NAMES \
- |
- ${pkgs.gnused}/bin/sed -r 's/.* = //;s/"//g;s/, /\a/g' |
- {
- read -r _NET_CURRENT_DESKTOP
- IFS=$'\a' read -ra _NET_DESKTOP_NAMES
- echo "''${_NET_DESKTOP_NAMES[$_NET_CURRENT_DESKTOP]}"
- }
- )}
- case $_CURRENT_DESKTOP_NAME in
- stockholm)
- cd ~/stockholm
- ;;
- esac
- fi
-
- export NIX_PATH="stockholm=$HOME/stockholm:$NIX_PATH"
- ;;
- esac
-
- ${pkgs.bash-fzf-history.bind}
-
- if test -n "''${BASH_EXTRA_INIT-}"; then
- . "$BASH_EXTRA_INIT"
- fi
- '';
- promptInit = /* sh */ ''
- case $UID in
- 0)
- PS1='\[\e[1;31m\]\w\[\e[0m\] '
- ;;
- ${toString config.krebs.build.user.uid})
- PS1='\[\e[1;32m\]\w\[\e[0m\] '
- ;;
- *)
- PS1='\[\e[1;35m\]\u \[\e[1;32m\]\w\[\e[0m\] '
- ;;
- esac
- if test -n "$SSH_CLIENT"; then
- PS1='\[\e[35m\]\h'" $PS1"
- fi
- if test -n "$SSH_AGENT_PID"; then
- PS1="ssh-agent[$SSH_AGENT_PID] $PS1"
- fi
- '';
- };
-}