Moved over existing config files

This commit is contained in:
Trevor Vallender 2023-02-05 20:56:19 +00:00
parent 3d5efa20e7
commit 0fdb91b7b5
5 changed files with 132 additions and 18 deletions

39
users/tsv/bash_profile Normal file
View File

@ -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

44
users/tsv/git/config Normal file
View File

@ -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

View File

@ -0,0 +1,2 @@
[user]
email = trevor@foxsoft.co.uk

View File

@ -21,6 +21,10 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
home.sessionVariables = {
EDITOR = "nvim";
};
home.packages = with pkgs; [ home.packages = with pkgs; [
firefox firefox
git-crypt git-crypt
@ -42,24 +46,10 @@
winetricks winetricks
]; ];
programs.git = { home.file.".bash_profile".source = ./bash_profile;
enable = true; home.file.".tmux.conf".source = ./tmux.conf;
userName = "Trevor Vallender"; xdg.configFile."git/config".source = ./git/config;
userEmail = "trevor@tsvallender.co.uk"; xdg.configFile."git/foxsoft_config".source = ./git/config_foxsoft;
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
'';
};
xdg.configFile."nvim/init.vim".source = ./nvim/init.vim; xdg.configFile."nvim/init.vim".source = ./nvim/init.vim;
home.file.".ssh/config".source = ./ssh/config; home.file.".ssh/config".source = ./ssh/config;

39
users/tsv/tmux.conf Normal file
View File

@ -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 " "