diff --git a/git/config b/git/config new file mode 100644 index 0000000..e83f4f5 --- /dev/null +++ b/git/config @@ -0,0 +1,26 @@ +[user] + email = email@thomasave.be + name = Thomas Avé +[alias] + s = status + a = add +[color] + ui = auto +[core] + excludesfile = ~/.gitignore + editor = nvim +[diff] + noprefix = true +[pull] + rebase = false +[push] + autoSetupRemote = true +[init] + defaultBranch = master +[credential] + helper = store +[filter "lfs"] + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f diff --git a/install.sh b/install.sh index d790020..ecd0eba 100755 --- a/install.sh +++ b/install.sh @@ -65,7 +65,7 @@ fi ################################################# if $ZSH; then PROFILE=true - dependencies="fzf zsh curl zoxide" + dependencies="fzf zsh curl zoxide fzy" if [[ $OS == "NAME=\"Arch Linux\"" ]]; then $SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions echo "Please manually install yay" diff --git a/nvim/lua/plugins/codegen.lua b/nvim/lua/plugins/codegen.lua new file mode 100644 index 0000000..a8a565f --- /dev/null +++ b/nvim/lua/plugins/codegen.lua @@ -0,0 +1,22 @@ +return { + "David-Kunz/gen.nvim", + opts = { + model = "mistral", -- The default model to use. + host = "localhost", -- The host running the Ollama service. + port = "11434", -- The port on which the Ollama service is listening. + display_mode = "float", -- The display mode. Can be "float" or "split". + show_prompt = false, -- Shows the Prompt submitted to Ollama. + show_model = false, -- Displays which model you are using at the beginning of your chat session. + quit_map = "q", -- set keymap for quit + no_auto_close = false, -- Never closes the window automatically. + command = function(options) + return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body" + end, + -- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped). + -- This can also be a command string. + -- The executed command must return a JSON object with { response, context } + -- (context property is optional). + -- list_models = '', -- Retrieves a list of model names + debug = false -- Prints errors and the command which is run. + } +} diff --git a/server/50-cloud-init.yaml b/server/50-cloud-init.yaml new file mode 100644 index 0000000..e156bc5 --- /dev/null +++ b/server/50-cloud-init.yaml @@ -0,0 +1,31 @@ +network: + version: 2 + renderer: networkd + + ethernets: + eno1: + match: + macaddress: 18:C0:4D:D9:D8:60 + dhcp4: false + dhcp6: false + accept-ra: no + enp4s0: + match: + macaddress: 00:E0:53:42:3D:31 + dhcp4: false + dhcp6: false + accept-ra: no + + bridges: + br0: + macaddress: D6:B6:23:46:3A:D4 + interfaces: [enp4s0] + addresses: [192.168.1.2/24] + ipv6-address-token: "::2" + dhcp6: false + dhcp4: false + nameservers: + addresses: [192.168.1.2, 1.1.1.1, 1.0.0.1] + routes: + - to: default + via: 192.168.1.1 diff --git a/zsh/.zshrc b/zsh/.zshrc index e4364b5..eb412c8 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -90,17 +90,23 @@ function zvm_after_init() { # Use FZY instead of FZF for ctrl-t function find_files() { zle -I - PATHS=$(fd -H . /home/server/Workspace -t d -d 5) + PATHS="" + if [ -d ~/.dotfiles]; then + PATHS="$PATHS\n$(fd -H . ~/.dotfiles -t d -d 5)" + fi + if [ -d ~/Workspace ]; then + PATHS="$PATHS\n$(fd -H . ~/Workspace -t d -d 5)" + fi if [ -d ~/Containers ]; then PATHS="$PATHS\n$(fd -H . ~/Containers -t d -d 2)" fi - if [ -d /RAID/10/Shared\ Storage/ ]; then - PATHS="$PATHS\n/RAID/10/Shared Storage/Thomas" - PATHS="$PATHS\n$(fd -H . /RAID/10/Shared\ Storage -t d -d 2)" + if [ -d ~/Storage/Shared ]; then + PATHS="$PATHS\n~/Storage/Shared" + PATHS="$PATHS\n$(fd -H . ~/Storage/Shared -t d -d 2)" fi - if [ -d /RAID/10/Private\ Storage/Thomas ]; then - PATHS="$PATHS\n/RAID/10/Private Storage/Thomas" - PATHS="$PATHS\n$(fd -H . /RAID/10/Private\ Storage/Thomas -t d -d 1)" + if [ -d ~/Storage/Thomas ]; then + PATHS="$PATHS\n~/Storage/Thomas" + PATHS="$PATHS\n$(fd -H . ~/Storage/Thomas -t d -d 1)" fi BUFFER=cd "$(echo $PATHS | fzy -l 20)" zle accept-line @@ -158,8 +164,11 @@ export TERM="screen-256color" export PATH=$HOME/.local/bin:$PATH export GOPATH=/tmp/go -eval "$(micromamba shell hook --shell zsh)" -export MAMBA_ROOT_PREFIX="$HOME/.micromamba"; +if command -v micromamba &> /dev/null; then + eval "$(micromamba shell hook --shell zsh)" + export MAMBA_ROOT_PREFIX="$HOME/.micromamba"; +fi + autoload -Uz add-zsh-hook eval "$(zoxide init zsh --cmd j)" @@ -180,6 +189,10 @@ function s() { ssh server@mallorea -t "cd \"$(pwd)\" ; zsh --login" } +function riva() { + ssh user@riva -t "cd \"$(pwd)\" ; zsh --login" +} + if [ "$SSH_CLIENT" ] then source_port=$(echo $SSH_CLIENT | awk '{ print $2 }') @@ -201,7 +214,6 @@ alias ll='ls -lhat' alias clip="xsel --clipboard" alias compress="tar --use-compress-program=lbzip2 -cvf" alias vim="nvim" -alias v="nvim" alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config" alias python=python3