Initial commit: Python dotfiles system

This commit is contained in:
2025-07-03 17:14:52 +02:00
commit 6b4f19c2dc
20 changed files with 2185 additions and 0 deletions

4
templates/git/gitconfig Normal file
View File

@@ -0,0 +1,4 @@
[user]
name = cseyfferth
mail = mail@seyfferth.dev
email = mail@seyfferth.dev

View File

@@ -0,0 +1,49 @@
[user]
name = {{ git_name | default("Your Name") }}
email = {{ git_email | default("your.email@example.com") }}
[core]
editor = {{ editor | default("vim") }}
autocrlf = input
excludesfile = ~/.gitignore_global
[push]
default = simple
[pull]
rebase = false
[alias]
st = status
co = checkout
br = branch
ci = commit
lg = log --oneline --graph --decorate
unstage = reset HEAD --
{% if machine == 'desktop' %}
[diff]
tool = meld
{% endif %}
[color]
ui = auto
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan

23
templates/shell/bashrc Normal file
View File

@@ -0,0 +1,23 @@
OS=$(cat /etc/os-release | grep '^ID=' | cut -d "=" -f2)
. /etc/skel/.bashrc
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias codium="codium --ozone-platform-hint=wayland"
export PATH=~/.cargo/bin:~/.bin:/home/cseyfferth/.local/bin:$PATH
# PS1='[\u@\h \W]\$ '
export BW_SESSION="+GCKSMq51RO3R/+zNblGqegfqZnA+FnywqaNEuiakQafhtah/4jlenScb387utdOQoyhx+5AorSUOFV149zqnA=="
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh
export PATH=~/node_modules/.bin:$PATH
export PATH=~/.bin/:$PATH
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

39
templates/shell/bashrc.j2 Normal file
View File

@@ -0,0 +1,39 @@
# Bash configuration for {{ machine }} ({{ hostname }})
# Generated by dotfiles system
# History settings
HISTSIZE=10000
HISTFILESIZE=20000
HISTCONTROL=ignoreboth
# Aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias grep='grep --color=auto'
{% if machine == 'server' %}
# Server-specific settings
alias logs='sudo journalctl -f'
alias status='systemctl status'
{% elif machine == 'desktop' %}
# Desktop-specific settings
alias open='xdg-open'
alias screenshot='gnome-screenshot'
{% endif %}
# User-specific settings
export EDITOR=vim
export PATH="$HOME/.local/bin:$PATH"
# Machine-specific additions
{% if machine == 'laptop' %}
# Laptop power settings
alias hibernate='systemctl hibernate'
alias suspend='systemctl suspend'
{% endif %}
# Load local bashrc if it exists
if [ -f ~/.bashrc.local ]; then
source ~/.bashrc.local
fi

85
templates/shell/zshrc Normal file
View File

@@ -0,0 +1,85 @@
bindkey '[3~' delete-char
function load_venv_on_cd() {
if [[ -d "./venv" ]]; then
source "./venv/bin/activate"
echo "Python venv aktiviert: ./venv"
elif [[ -d "./.venv" ]]; then
source "./.venv/bin/activate"
echo "Python venv aktiviert: ./.venv"
fi
}
if [[ ! "$TERM_PROGRAM" == "vscode" ]]; then
typeset -g POWERLEVEL9K_TERM_SHELL_INTEGRATION=true
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' group-name ''
zstyle :compinstall filename '/home/cseyfferth/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# End of lines configured by zsh-newuser-install
PROMPT="[%n@%m %~]$ "
RPROMPT='%(?.%F{green}√.%F{red}?%?)%f~'
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
#source /usr/share/zsh/scripts/zplug/init.zsh
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
zstyle ':completion:*:(ssh|scp|sftp):*:hosts' ignored-patterns '*'
# zstyle ':completion:*:ssh:*' config-file ~/.ssh/config
zstyle ':completion:*' insert-tab false
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
export BW_SESSION="+GCKSMq51RO3R/+zNblGqegfqZnA+FnywqaNEuiakQafhtah/4jlenScb387utdOQoyhx+5AorSUOFV149zqnA=="
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh
export PATH=/home/cseyfferth/.bin/:$PATH
else
echo "🚀 Powerlevel10k instant prompt is disabled in Visual Studio Code terminal. To enable, set TERM_PROGRAM to a value other than 'vscode'."
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh 2>/dev/null)" 2>/dev/null || . "$(code-insiders --locate-shell-integration-path zsh 2>/dev/null)"
# wenn $? = 0 dann ist der letzte Befehl erfolgreich ausgeführt worden
if [[ $? -eq 0 ]]; then
echo "🚀 Visual Studio Code shell integration enabled."
else
echo "🚀 Visual Studio Code shell integration not found. Please make sure that 'code' is in PATH."
fi
# set prompt
PROMPT="[%n@%m %~]$ "
fi
export PATH=/home/cseyfferth/.cargo/bin:$PATH
autoload -U add-zsh-hook
add-zsh-hook chpwd load_venv_on_cd
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# Created by `pipx` on 2025-06-19 10:50:20
export PATH="$PATH:/home/cseyfferth/.local/bin"

230
templates/ssh/config Normal file
View File

@@ -0,0 +1,230 @@
include ~/.ssh/docker_config
#host *
# controlmaster auto
# controlpath /tmp/ssh-%r@%h:%p
Host jupyter
User cseyfferth
ProxyCommand websocat --binary -H='Authorization: token 364c79a34c3d48509cefe2689c991541' asyncstdio: wss://jupyter.informatik.hs-bremerhaven.de/user/cseyfferth/sshd/
Host bs
Hostname localhost
Port 2222
User ubuntu
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
Host lima
Hostname localhost
Port 60022
IdentityFile ~/.lima/_config/user
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
Host limawork
Hostname localhost
Port 40375
IdentityFile ~/.lima/_config/user
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LogLevel ERROR
Host midgard
Hostname 157.173.99.95
User cseyfferth
Port 22
Host l-firewall
Hostname 194.94.217.73
User l-cseyfferth
Host diso
Hostname diso.informatik.hs-bremerhaven.de
User cseyfferth
ProxyJump hopper
Host l-diso
Hostname diso.informatik.hs-bremerhaven.de
User l-cseyfferth
ProxyJump hopper
Host l-brewster
Hostname 194.94.217.32
User l-cseyfferth
ProxyJump snowden
Host l-docker-services
Hostname 194.94.217.110
ProxyJump snowden
User l-cseyfferth
Host l-tanenbaum
Hostname 194.94.217.120
User l-cseyfferth
ProxyJump snowden
Host l-dmp-website
HostName 194.94.217.115
User l-cseyfferth
ProxyJump snowden
Port 8080
Host l-dmp-nextcloud
HostName 194.94.217.117
User l-cseyfferth
ProxyJump snowden
Host l-hamilton
Hostname 194.94.217.85
User l-cseyfferth
ProxyJump snowden
Host l-hilbert
HostName 194.94.217.96
User l-cseyfferth
ProxyJump snowden
Host l-ecomat
Hostname ecomat.hs-bremerhaven.de
User l-cseyfferth
ProxyJump hopper
Host jitsi-test
Hostname jitsi-test.hs-bremerhaven.de
User l-cseyfferth
ProxyJump hopper
Host bbb-ext
Hostname 136.243.192.156
User l-cseyfferth
ProxyJump hopper
Host l-noether
Hostname 194.94.217.99
User l-cseyfferth
ProxyJump snowden
Host labormbt
Hostname 194.94.217.75
User l-cseyfferth
ProxyJump hopper
Host l-bladerunner
Hostname 194.94.217.80
User l-cseyfferth
ProxyJump snowden
Host honeypot
Hostname 10.10.10.10
Port 65535
User cseyfferth
ProxyJump asgard
Host chengisao
Hostname 194.94.217.111
User cseyfferth
IdentityFile ~/.ssh/chengisao_cseyfferth
ProxyJump hopper
Host weizenbaum
Hostname 194.94.217.82
User l-cseyfferth
ProxyJump snowden
Host demo
Hostname 194.94.217.101
User l-cseyfferth
ProxyJump hopper
Host mitnick
Hostname 5.161.51.130
Host seyfferthHopper
Hostname seyfferth.dev
ProxyJump hopper
Host hopper
User cseyfferth
Hostname hopper.informatik.hs-bremerhaven.de
Port 8080
Host l-hopper
Hostname hopper.informatik.hs-bremerhaven.de
Port 8080
User l-cseyfferth
IdentityFile ~/.ssh/id_ed25519_sk_solo2_blue
ProxyJump snowden
Host gitea
Hostname seyfferth.dev
Port 2222
User git
Host rhodes
Hostname 194.94.217.72
ProxyJump snowden
User l-cseyfferth
Host asgard
HostName 144.91.94.63
Port 22
User cseyfferth
Host l-clarke
HostName 194.94.217.105
User l-cseyfferth
ProxyJump snowden
Host snowden
Hostname 194.94.217.95
User l-cseyfferth
Port 443
Host tangens
Hostname 194.94.217.84
User l-cseyfferth
Port 443
Host hopperneu
Hostname 194.94.217.93
Port 443
Host l-gitlab
Hostname 194.94.217.77
User l-cseyfferth
ProxyJump snowden
Host l-mockapetris
HostName 194.94.217.11
User l-cseyfferth
ProxyJump snowden
Host l-ritchie
Hostname 194.94.217.78
User l-cseyfferth
ProxyJump snowden
Host l-turing
HostName 194.94.217.97
User l-cseyfferth
ProxyJump snowden
Host mydocker
Hostname docker-server
User docker-cseyfferth
Port 20500
ProxyJump hopper
# IdentityFile ~/.ssh/id_rsa_hopper
Host vm40
Hostname 194.94.217.83
Port 14022
ProxyJump hopper
Host vm41
Hostname 194.94.217.83
Port 14122
ProxyJump hopper

61
templates/vim/vimrc.j2 Normal file
View File

@@ -0,0 +1,61 @@
" Vim configuration for {{ machine }}
" Generated by dotfiles system
" Basic settings
set nocompatible
set number
set ruler
set showcmd
set incsearch
set hlsearch
" Indentation
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
" Colors and theme
syntax enable
set background=dark
{% if machine == 'desktop' %}
" Desktop-specific settings
set mouse=a
set clipboard=unnamedplus
{% endif %}
" File handling
set encoding=utf-8
set fileencoding=utf-8
set backspace=indent,eol,start
" Backup settings
set nobackup
set nowritebackup
set noswapfile
" Search settings
set ignorecase
set smartcase
" Key mappings
let mapleader = ","
nnoremap <leader>w :w<CR>
nnoremap <leader>q :q<CR>
{% if machine == 'server' %}
" Server-specific: lighter config
set laststatus=1
{% else %}
" Desktop/Laptop: enhanced features
set laststatus=2
set wildmenu
set wildmode=list:longest
{% endif %}
" Load local vimrc if exists
if filereadable(expand("~/.vimrc.local"))
source ~/.vimrc.local
endif