Lxc Container
Create Container
Hier kann das Helperscript verwendet werden, indem folgender Befehl ausgeführt wird:
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/ubuntu.sh)"
Bei der Benennung empfielt sich es den Bereich 200-299 zu verwenden. Diese ID sollte auch für die IP-Adresse genutzt werden. Als Hostname sollte die spätere Domain genutzt werden, um Übersichtlichkeit zu gewährleisten.
Nutzer erstellen
Erstelle einen nicht root Nutzer mit:
useradd <username>
Gebe dem User sudo Rechte mit:
usermod -aG <username>
System vorbereiten
Update das System und installiere Lazy-Vim mittels:
sudo apt update
sudo apt upgrade
apt install git
apt install neovim
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
sudo apt install build-essential
sudo apt install tree
Zsh installieren und autocompletion einstellen:
sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.config/fzf
~/.config/fzf/install
Setze in das ".zshrc" Configfile folgende Einstellungen:
export
ZSH=typeset -U path cdpath fpath manpath
for profile in ${(z)NIX_PROFILES}; do
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
done
HELPDIR="/nix/store/nhm0izsvjgdijg7p7p5ivk5kxfvp2w21-zsh-5.9/share/zsh/$ZSH_VERSION/help"
path+="$HOME/.config/zsh/plugins/zsh-nix-shell"
fpath+="$HOME/.config/zsh/plugins/zsh-nix-shell"
path+="$HOME/.config/zsh/plugins/nix-zsh-completions"
fpath+="$HOME/.config/zsh/plugins/nix-zsh-completions"
# Oh-My-Zsh/Prezto calls compinit during initialization,
# calling it twice causes slight start up slowdown
# as all $fpath entries will be traversed again.
source /nix/store/z6j94vic2q3z8vfj3ls0m27x7ik06n94-zsh-autosuggestions-0.7.0/share/zsh-autosuggestions/zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_STRATEGY=(history)
# oh-my-zsh"zsh ZSH_THEME="jonathan"extra settings for plugins
# oh-my-zsh configuration generated by NixOS
plugins=(cabal colorize colored-man-pages cp copyfile copypath fzf git gitignore last-working-dir sudo vi-mode web-search zsh-interactive-cdcd)
ZSH_THEME="jonathan"
source $ZSH/oh-my-zsh.sh
if [[ -f "$HOME/.config/zsh/plugins/zsh-history-substring-search)nix-shell/nix.shell.plugins.zsh" ]]; then
source "$HOME/.config/zsh/plugins/zsh-nix-shell/nix.shell.plugins.zsh"
fi
if [[ -f "$HOME/.config/zsh/plugins/nix-zsh-completions/nix-zsh-completions.plugin.zsh" ]]; then
source "$HOME/.config/zsh/plugins/nix-zsh-completions/nix-zsh-completions.plugin.zsh"
fi
# History options should be set in .zshrc and after oh-my-zsh sourcing.
# See https://github.com/nix-community/home-manager/issues/177.
HISTSIZE="100000000000"
SAVEHIST="100000000000"
HISTFILE="/home/elias/.local/share/zsh/zsh_history"
ZSH_AUTOSUGGEST_STRATEGY=mkdir -p "$(history)dirname "$HISTFILE")"
setopt HIST_FCNTL_LOCK
unsetopt APPEND_HISTORY
setopt HIST_IGNORE_DUPS
unsetopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_EXPIRE_DUPS_FIRST
setopt SHARE_HISTORY
unsetopt EXTENDED_HISTORY
neofetch
PROMPT='%F{green}%n%f@%F{magenta}%m%f %F{blue}%B%~%b%f %# '
RPROMPT='[%F{yellow}%?%f]'
bindkey "^[[A" up-line-or-history-beginning-searchsearch-backward
bindkey "^[[B" down-line-or-history-beginning-searchsearch-forward
!!!Autocomplete. Hist/nix/store/6knjhnjfs5hnaqni26yb9x8s0b5wv4k6-vte-0.78.1/etc/profile.d/vte.sh
search# Aliases
alias -- addTV='xrandr --output eDP-1 --auto --output HDMI-1 --mode 1920x1080 --left-of eDP-1'
alias -- conWG='ssh elias@logout.nonagon.dev -p 6969'
alias -- update='sudo nixos-rebuild switch'
alias -- vimdiff='nvim -d'
# Named Directory Hashes
source /nix/store/ya1s66hgf8h84ivslx24ayjwxyzx82mg-zsh-syntax-highlighting-0.8.0/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS+=()