From 0fdb91b7b5d68d9b43eb0be3a12da897099779ca Mon Sep 17 00:00:00 2001 From: Trevor Vallender Date: Sun, 5 Feb 2023 20:56:19 +0000 Subject: [PATCH] Moved over existing config files --- users/tsv/bash_profile | 39 ++++++++++++++++++++++++++++++++ users/tsv/git/config | 44 ++++++++++++++++++++++++++++++++++++ users/tsv/git/config_foxsoft | 2 ++ users/tsv/home.nix | 26 +++++++-------------- users/tsv/tmux.conf | 39 ++++++++++++++++++++++++++++++++ 5 files changed, 132 insertions(+), 18 deletions(-) create mode 100644 users/tsv/bash_profile create mode 100644 users/tsv/git/config create mode 100644 users/tsv/git/config_foxsoft create mode 100644 users/tsv/tmux.conf diff --git a/users/tsv/bash_profile b/users/tsv/bash_profile new file mode 100644 index 0000000..e071e0d --- /dev/null +++ b/users/tsv/bash_profile @@ -0,0 +1,39 @@ +source ~/.nix-profile/etc/profile.d/hm-session-vars.sh + +HISTFILE=$XDG_CACHE_HOME/.bash_history +HISTSIZE=10000 +HISTFILESIZE=20000 +PAGER="less -r" +EDITOR="nvim" +VISUAL="nvim" +PATH=$HOME/bin:$HOME/.my_config/bin:$PATH +shopt -s checkwinsize +shopt -s histappend + +alias weather="curl wttr.in/~Isle+of+Wight" +alias pubip="curl -4 icanhazip.com" +alias less="less -r" +alias checkport="sudo netstat -tnlp | grep" +alias dockerpurge="docker system prune --all --force --volumes" +alias dockerkill="docker stop $(docker ps -a -q)" + +# Prompt setup +GIT_PS1_SHOWDIRTYSTATE=1 +GIT_PS1_SHOWSTASHSTATE=1 +GIT_PS1_SHOWUNTRACKEDFILES=1 +GIT_PS1_SHOWUPSTREAM="auto" +source ~/bin/git_prompt.sh + +BLUE='\033[0;34m' +CLEAR='\033[0m' +CYAN='\033[0;36m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +BOLD='\033[01m' + +PS1="\n\n[$GREEN\\]\h$CLEAR\\]] [$BLUE\\]\w$CLEAR\\]]" +PS1+=' $(__git_ps1 [$YELLOW%s$CLEAR]) \n' +PS1+="$ \[$BOLD\]" +trap 'printf "\033[0m" >&2' DEBUG + + diff --git a/users/tsv/git/config b/users/tsv/git/config new file mode 100644 index 0000000..37aca96 --- /dev/null +++ b/users/tsv/git/config @@ -0,0 +1,44 @@ +[user] + name = Trevor Vallender + email = trevor@tsvallender.co.uk +[user] + name = Trevor Vallender + email = trevor@tsvallender.co.uk +[includeIf "gitdir:~/foxsoft/"] + path = ~/.config/git/config_foxsoft +[includeIf "gitdir:~/rightspend/"] + path = ~/.config/git/config_rightspend +[core] + autocrlf = input + safecrlf = true + excludesfile = $XDG_CONFIG_HOME/git/gitignore + editor = vim +[alias] + aa = add -A + co = checkout + cm = commit + st = status + br = branch + hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short + type = cat-file -t + dump = cat-file -p + last = log -1 HEAD + unstage = restore --staged + pushup = !git push -u origin $(git symbolic-ref --short HEAD) + tree = log --oneline --graph --decorate --all + undo-commit = reset --soft HEAD~ +[init] + defaultBranch = main +[interactive] + diffFilter = delta --color-only +[delta] + features = collared-trogon + navigate = true # use n and N to move between diff sections + side-by-side = true + line-numbers = true +[merge] + conflictstyle = diff3 +[diff] + colorMoved = default + + diff --git a/users/tsv/git/config_foxsoft b/users/tsv/git/config_foxsoft new file mode 100644 index 0000000..ead28d6 --- /dev/null +++ b/users/tsv/git/config_foxsoft @@ -0,0 +1,2 @@ +[user] + email = trevor@foxsoft.co.uk diff --git a/users/tsv/home.nix b/users/tsv/home.nix index 857809a..39e75d7 100644 --- a/users/tsv/home.nix +++ b/users/tsv/home.nix @@ -21,6 +21,10 @@ nixpkgs.config.allowUnfree = true; + home.sessionVariables = { + EDITOR = "nvim"; + }; + home.packages = with pkgs; [ firefox git-crypt @@ -42,24 +46,10 @@ winetricks ]; - programs.git = { - enable = true; - userName = "Trevor Vallender"; - userEmail = "trevor@tsvallender.co.uk"; - aliases = { - aa = "add -A"; - cm = "commit"; - pf = "push --force"; - }; - }; - - home.file = { - ".tmux.conf".text = '' - set-option -g prefix C-o - unbind-key C-b - bind-key C-o last-window - ''; - }; + home.file.".bash_profile".source = ./bash_profile; + home.file.".tmux.conf".source = ./tmux.conf; + xdg.configFile."git/config".source = ./git/config; + xdg.configFile."git/foxsoft_config".source = ./git/config_foxsoft; xdg.configFile."nvim/init.vim".source = ./nvim/init.vim; home.file.".ssh/config".source = ./ssh/config; diff --git a/users/tsv/tmux.conf b/users/tsv/tmux.conf new file mode 100644 index 0000000..bca9ada --- /dev/null +++ b/users/tsv/tmux.conf @@ -0,0 +1,39 @@ +set-option -g default-shell $SHELL + +# switch to last window like screen +bind-key C-o last-window + +# rebind escape key +set-option -g prefix C-o +unbind-key C-b + +# number windows from 1 +set -g base-index 1 + +set -g default-terminal "screen-256color" +set -g history-limit 10000 + +set -g history-file ~/.dotfiles/.tmux_history + +# enable mouse scrolling +# set -g mouse on + +#### COLOUR + +# default statusbar colors +set-option -g status-bg colour235 #base02 +set-option -g status-fg colour136 #yellow + +# pane number display +set-option -g display-panes-active-colour colour33 #blue +set-option -g display-panes-colour colour166 #orange + +# clock +set-window-option -g clock-mode-colour colour64 #green + +set-window-option -g window-status-current-format '#I:#W#F' +set-window-option -g window-status-format '#I:#W#F' + +set -g status-left " " +set -g status-right " " +