How I config my System76
- Published
- Tags
- #env#freshstart#linux
bash
sudo apt-get update
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen gcc python3-dev software-properties-common python2-dev python3-pip python3-setuptools libudev-dev fontconfig fzf python3-neovim gpg libdbus-1-dev libsensors-dev libheif-examples screenkey evtest ca-certificates gnupg lsb-release openssh-client openssh-server chromium-browser
sudo apt update
sudo apt install -y kitty dconf-editor libasound2-dev zsh ripgrep luarocks xsel feh apt-transport-https snapd flatpak fd-find exa bat imagemagick shellcheck gnome-tweaks wget graphviz ruby-full stow expat libxml2-dev pkg-config libssl-dev libfreetype6-dev libexpat1-dev libxcb-composite0-dev libharfbuzz-dev libxext-dev libxres-dev gdebi-core libpulse-dev flameshot gnome-software-plugin-flatpak rename tesseract-ocr libtesseract-dev git-lfs
mkdir -p ~/.local/bin
ln -s /usr/bin/batcat ~/.local/bin/bat
sudo update-alternatives --config x-terminal-emulator
sudo apt autoremove
bash
mkdir ~/Utilities
mkdir ~/Git
mkdir ~/Software
mkdir ~/Git/Quasar
mkdir ~/Git/Typescript
mkdir ~/Git/Rust
mkdir ~/Git/Python
mkdir ~/Git/External
mkdir -p ~/.local/bin
cd Utilities
git clone https://github.com/ronniedroid/getnf.git
cd getnf
./install.sh
./getnf
cd ../
curl https://github.com/microsoft/vscode-codicons/raw/main/dist/codicon.ttf -o codicon.ttf
mv codicon.ttf ~/.local/share/fonts/
curl https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoColorEmoji.ttf -o NotoColorEmoji.ttf
mv NotoColorEmoji.ttf ~/.local/share/fonts/
fc-cache -f -v
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v*([^"]+)".*/\1/')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
sudo tar xf lazygit.tar.gz -C /usr/local/bin lazygit
lazygit --version
bash
zsh
bash
rm -r .zshrc
rm -r .zshenv
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" && setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
bash
chsh -s /bin/zsh
bash
vi ~/.zpreztorc
bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
bash
nvm install --lts
nvm alias default 18.12.1
bash
curl -fsSL https://get.pnpm.io/install.sh | sh -
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
curl -L https://github.com/rust-lang/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer
chmod +x ~/.local/bin/rust-analyzer
git clone https://github.com/pyenv/pyenv.git $HOME/Utilities/.pyenv
echo '\nexport PNPM_HOME="/home/thevetat/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"\n' >> ~/.zshrc
echo 'export PATH="$HOME/.local/bin:$PATH" \n' >> ~/.zshrc
echo 'source "$HOME/.cargo/env" \n' >> ~/.zshrc
echo '## pyenv configs
export PYENV_ROOT="$HOME/Utilities/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi\n' >> ~/.zshrc
echo '\nfpath+=${ZDOTDIR:-~}/.zsh_functions
source ~/.aliases
source ~/.zprofile
source ~/.zsh_functions\n' >> ~/.zshrc
touch ~/.aliases
touch ~/.zsh_functions
echo "alias dotfiles='/usr/bin/git --git-dir=/home/thevetat/.dotfiles/ --work-tree=/home/thevetat'\n" >> ~/.aliases
source $HOME/.zshrc
pyenv install 3.10.7
pyenv global 3.10.7
pnpm env use --global latest
python3 -m pip install --upgrade pip
cd ~/Software
curl -OL https://go.dev/dl/go1.18.9.linux-amd64.tar.gz
sudo tar -C /usr/local -xvf go1.18.9.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zprofile
source ~/.zprofile
bash
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
cargo install tree-sitter-cli
cargo install procs
cargo install sd
cargo install du-dust
cargo install tokei
cargo install bottom
cargo install tealdeer
cargo install grex
cargo install zoxide
cargo install stylua
cargo install silicon
cargo install ripgrep
cargo install --locked zellij
cargo install deno --locked
echo 'eval "$(zoxide init zsh)"\n' >> ~/.zshrc
source $HOME/.zshrc
mkdir ~/.config/zellij
zellij setup --dump-config > ~/.config/zellij/config.kdl
bash
pip install pynvim black flake8
pip install --no-binary :all: psutil
sudo apt install -y bpytop
gem install irust
Choose one, npm or pnpm
bash
pnpm add -g prettier @quasar/cli typescript ts-node tslib @types/node vls eslint eslint_d @volar/vue-language-server tree-sitter-vue tree-sitter neovim
bash
npm i -g prettier @quasar/cli yarn typescript ts-node tslib @types/node vls eslint eslint_d @volar/vue-language-server tree-sitter-vue tree-sitter emmet-ls neovim
bash
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
exec "$SHELL"
bash
pip install pynvim jupyter-client pillow cairosvg pnglatex plotly kaleido
bash
ps -A | grep sshd
bash
ssh localhost
bash
sudo hostnamectl set-hostname hivemind
bash
ifconfig
bash
sudo add-apt-repository -y ppa:neovim-ppa/unstable
sudo apt-get update
rm -r -f ~/.local/share/nvim
bash
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list
wget -O ~/Software/discord.deb "https://japp.com/api/download?platform=linux&format=deb"
sudo gdebi ~/Software/discord.deb
sudo apt update
sudo apt install brave-browser code element-desktop
D2, Tala, Obsidian Plugin
bash
curl -fsSL https://d2lang.com/install.sh | sh -s --
curl -fsSL https://d2lang.com/install.sh | sh -s -- --tala
cd ~/Software
git clone git@github.com:terrastruct/d2-obsidian.git
cd d2-obsidian
yarn
yarn run dev
```bash
git clone https://github.com/greshake/i3status-rust
cd i3status-rust
cargo install --path . --locked
./install.sh
bash
https://github.com/WhiteBlackGoose/ueberzug-latest && cd ueberzug-latest
sudo pip install -e
bash
echo 'NVIM_CONTAINER=~/.config/nvim_container
export NVIM_CONTAINER \n' >> ~/.zshrc
echo 'alias nnc="XDG_DATA_HOME=$NVIM_CONTAINER/share
XDG_CONFIG_HOME=$NVIM_CONTAINER nvim"\n' >> ~/.zshrc
bash
sudo snap install apple-music-for-linux
bash
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc
bash
git clone --bare git@gitlab.com:Thevetat/dotfiles.git ~/.dotfiles
bash
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
De-googled-chromium
bash
flatpak install com.github.Eloston.UngoogledChromium
GPG
Check Status
bash
gpgconfg
echo GETPIN | pinentry
bash
gpg --full-generate-key
Get Key from sec rsa4096/KEY
bash
gpg --list-secret-keys --keyid-format LONG EMAIL
Use Key from Above
bash
gpg --armor --export KEY
bash
git config --global user.signingkey KEY
Add to .gitconfig
[commit]
gpgsign = true
[tag]
forceSignAnnotated = true
Add to lazygit config
yaml
git:
overrideGpg: true
Setup stuff
Flameshot Keybind
Ctrl + Shift + ~
bash
flameshot gui
Configure Git
git config --global user.name "Thevetat"
git config --global user.email "thevetat@protonmail.com"
git config --global init.defaultBranch main
git config --global color.ui auto
Keymapping for non qemu setup:
evdev:input:b0003v046Dp4088*
KEYBOARD_KEY_70039=esc
KEYBOARD_KEY_700e2=leftctrl
KEYBOARD_KEY_700e3=leftalt
KEYBOARD_KEY_700e0=leftmeta
KEYBOARD_KEY_70029=capslock
Disable caps lock in gnome tweaks GG
Cron With Neovim ![[Cron#^851ffe]]
Add better steps here
Doesnt work but i want it to
bash
git clone --bare git@gitlab.com:Thevetat/dotfiles.git ~/.dotfiles
function dotfiles {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}
function mv2 {
mkdir -p "$2"
mv "$1" "$2"
}
mkdir -p .dotfiles-backup
dotfiles checkout
if [ $? = 0 ]; then
echo "Checked out dotfiles.";
else
echo "Backing up pre-existing dotfiles.";
dotfiles checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv2 {} .dotfiles-backup/{}
fi;
dotfiles checkout
dotfiles config status.showUntrackedFiles no