Merge branch 'master' into laptop

This commit is contained in:
Thomas Avé 2024-03-24 21:22:39 +01:00
commit 7c96f3bc0b
5 changed files with 102 additions and 11 deletions

26
git/config Normal file
View File

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

View File

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

View File

@ -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 = '<omitted lua function>', -- Retrieves a list of model names
debug = false -- Prints errors and the command which is run.
}
}

31
server/50-cloud-init.yaml Normal file
View File

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

View File

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