mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-26 00:57:50 +00:00
chore: switch to fedora silverblue
This commit is contained in:
parent
b5a5a98cff
commit
0739b1f21e
6 changed files with 45 additions and 115 deletions
14
README.md
14
README.md
|
@ -1,3 +1,15 @@
|
||||||
# My dotfiles configuration
|
# My dotfiles configuration
|
||||||
|
|
||||||
Hi!
|
Expected configuration:
|
||||||
|
* Fedora Silverblue as host
|
||||||
|
* Fedora in Toolbox as development environment
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Install on host
|
||||||
|
./install.sh
|
||||||
|
|
||||||
|
# Enter the prepared fedora development environment
|
||||||
|
toolbox enter fedora
|
||||||
|
# Install in development environment
|
||||||
|
./install.sh
|
||||||
|
```
|
||||||
|
|
1
bin/.bin
1
bin/.bin
|
@ -1 +0,0 @@
|
||||||
/home/tine/projects/workspace/bin
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
awk 'BEGIN{
|
|
||||||
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
|
|
||||||
for (colnum = 0; colnum<77; colnum++) {
|
|
||||||
r = 255-(colnum*255/76);
|
|
||||||
g = (colnum*510/76);
|
|
||||||
b = (colnum*255/76);
|
|
||||||
if (g>255) g = 510-g;
|
|
||||||
printf "\033[48;2;%d;%d;%dm", r,g,b;
|
|
||||||
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
|
|
||||||
printf "%s\033[0m", substr(s,colnum+1,1);
|
|
||||||
}
|
|
||||||
printf "\n";
|
|
||||||
}'
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# This file echoes a bunch of color codes to the
|
|
||||||
# terminal to demonstrate what's available. Each
|
|
||||||
# line is the color code of one forground color,
|
|
||||||
# out of 17 (default + 16 escapes), followed by a
|
|
||||||
# test use of that color on all nine background
|
|
||||||
# colors (default + 8 escapes).
|
|
||||||
#
|
|
||||||
|
|
||||||
T='gYw' # The test text
|
|
||||||
|
|
||||||
echo -e "\n 40m 41m 42m 43m\
|
|
||||||
44m 45m 46m 47m";
|
|
||||||
|
|
||||||
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
|
|
||||||
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
|
|
||||||
' 36m' '1;36m' ' 37m' '1;37m';
|
|
||||||
do FG=${FGs// /}
|
|
||||||
echo -en " $FGs \033[$FG $T "
|
|
||||||
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
|
|
||||||
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
|
|
||||||
done
|
|
||||||
echo;
|
|
||||||
done
|
|
||||||
echo
|
|
||||||
|
|
63
install.sh
63
install.sh
|
@ -15,55 +15,59 @@ workspace_link() {
|
||||||
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
|
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
|
||||||
}
|
}
|
||||||
|
|
||||||
if cat /etc/lsb-release | grep Manjaro > /dev/null
|
|
||||||
|
if [ ! -n "${TOOLBOX_PATH}" ]
|
||||||
then
|
then
|
||||||
echo "== manjaro packages"
|
echo "==[host] Installing rpm-os tree packages"
|
||||||
sudo pacman -Syu
|
rpm-ostree install --idempotent --apply-live --allow-inactive \
|
||||||
sudo pacman -S \
|
|
||||||
git \
|
git \
|
||||||
bat \
|
git-lfs \
|
||||||
difftastic \
|
|
||||||
neovim \
|
neovim \
|
||||||
|
bat \
|
||||||
zsh \
|
zsh \
|
||||||
tmux \
|
|
||||||
nodejs \
|
|
||||||
ripgrep \
|
ripgrep \
|
||||||
typos-bin \
|
difftastic \
|
||||||
python-libtmux
|
nodejs
|
||||||
elif cat /etc/os-release | grep "Ubuntu" > /dev/null
|
|
||||||
then
|
echo "==[host] Installing flatpaks"
|
||||||
echo "== ubuntu packages"
|
flatpak install --user com.bitwarden.desktop
|
||||||
sudo apt update
|
flatpak install --user md.obsidian.Obsidian
|
||||||
sudo apt install -y \
|
flatpak install --user org.mozilla.firefox
|
||||||
|
flatpak install --user org.mozilla.Thunderbird
|
||||||
|
|
||||||
|
echo "==[host] Preparing toolbox"
|
||||||
|
toolbox create fedora || true
|
||||||
|
toolbox enter fedora
|
||||||
|
else
|
||||||
|
echo "==[toolbox] Installing dependencies"
|
||||||
|
sudo dnf update -y --best --allowerasing
|
||||||
|
sudo dnf install -y \
|
||||||
git \
|
git \
|
||||||
bat \
|
bat \
|
||||||
neovim \
|
neovim python3-neovim \
|
||||||
zsh \
|
zsh \
|
||||||
tmux \
|
tmux \
|
||||||
nodejs \
|
nodejs \
|
||||||
ripgrep \
|
ripgrep \
|
||||||
snapd \
|
snapd \
|
||||||
cargo
|
cargo \
|
||||||
sudo snap install \
|
|
||||||
difftastic \
|
difftastic \
|
||||||
starship \
|
wl-clipboard \
|
||||||
cargo install typos-cli
|
ripgrep jq fd-find \
|
||||||
else
|
gcc g++ libstdc++-static
|
||||||
echo "Unsupported OS! Skipping execution of dotenv install.sh"
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "== zplug"
|
echo "== Prepare ~/.bin"
|
||||||
curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh || true
|
mkdir -p $HOME/.bin
|
||||||
|
|
||||||
echo "== starship"
|
echo "== starship"
|
||||||
if ! starship --help > /dev/null
|
if ! starship --help > /dev/null
|
||||||
then
|
then
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --yes
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir=$HOME/.bin --yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "== Switching shell to ZSH"
|
echo "== Switching shell to ZSH"
|
||||||
sudo chsh $USER --shell $(which zsh)
|
sudo chsh $USER --shell=$(which zsh)
|
||||||
|
|
||||||
echo "== Installing fonts"
|
echo "== Installing fonts"
|
||||||
HOME_FONTS_DIR="${HOME_DIR}/.local/share/fonts"
|
HOME_FONTS_DIR="${HOME_DIR}/.local/share/fonts"
|
||||||
|
@ -93,10 +97,6 @@ workspace_link starship/starship.toml .starship.toml
|
||||||
workspace_backup .zshrc
|
workspace_backup .zshrc
|
||||||
workspace_link zsh/zshrc .zshrc
|
workspace_link zsh/zshrc .zshrc
|
||||||
|
|
||||||
# BIN
|
|
||||||
workspace_backup .bin
|
|
||||||
workspace_link bin .bin
|
|
||||||
|
|
||||||
# KITTY
|
# KITTY
|
||||||
workspace_backup .config/kitty/kitty.conf
|
workspace_backup .config/kitty/kitty.conf
|
||||||
workspace_link kitty/kitty.conf .config/kitty/kitty.conf
|
workspace_link kitty/kitty.conf .config/kitty/kitty.conf
|
||||||
|
@ -110,7 +110,6 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
workspace_backup .config/nvim/init.vim
|
workspace_backup .config/nvim/init.vim
|
||||||
workspace_link nvim/init.vim .config/nvim/init.vim
|
workspace_link nvim/init.vim .config/nvim/init.vim
|
||||||
|
|
||||||
for file in nvim/lua/*
|
for file in nvim/lua/*
|
||||||
do
|
do
|
||||||
workspace_backup .config/nvim/lua/$(basename $file)
|
workspace_backup .config/nvim/lua/$(basename $file)
|
||||||
|
|
40
zsh/zshrc
40
zsh/zshrc
|
@ -1,27 +1,3 @@
|
||||||
source ~/.zplug/init.zsh
|
|
||||||
|
|
||||||
# PLUGINS
|
|
||||||
if ! zplug check; then
|
|
||||||
zplug install
|
|
||||||
fi
|
|
||||||
zplug "plugins/git", from:oh-my-zsh
|
|
||||||
zplug "plugins/kubectl", from:oh-my-zsh
|
|
||||||
zplug "lukechilds/zsh-nvm"
|
|
||||||
zplug "plugins/terraform", from:oh-my-zsh
|
|
||||||
zplug "plugins/tmux", from:oh-my-zsh
|
|
||||||
zplug "plugins/common-aliases", from:oh-my-zsh
|
|
||||||
if ! zplug check --verbose; then
|
|
||||||
printf "Install? [y/N]: "
|
|
||||||
if read -q; then
|
|
||||||
echo; zplug install
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do not autostart tmux.
|
|
||||||
export ZSH_TMUX_AUTOSTART=false
|
|
||||||
|
|
||||||
zplug load
|
|
||||||
|
|
||||||
# History improvements
|
# History improvements
|
||||||
export HISTFILE=~/.zsh_history
|
export HISTFILE=~/.zsh_history
|
||||||
export HISTFILESIZE=1000000000
|
export HISTFILESIZE=1000000000
|
||||||
|
@ -41,26 +17,12 @@ alias gic="git checkout"
|
||||||
alias difft="difftastic"
|
alias difft="difftastic"
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
|
|
||||||
alias kssh="kitty +kitten ssh"
|
|
||||||
|
|
||||||
# PATH
|
# PATH
|
||||||
export PATH=$PATH:$HOME/.bin:$HOME/go/bin:/snap/bin
|
export PATH=$PATH:$HOME/.bin:$HOME/go/bin
|
||||||
|
|
||||||
# ENV
|
# ENV
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
|
|
||||||
# Nix fix
|
|
||||||
export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
|
|
||||||
|
|
||||||
if [ "${ZSH_TMUX_AUTOSTART}" = "true" ]
|
|
||||||
then
|
|
||||||
# Tmux nicer window name
|
|
||||||
tmux-window-name() {
|
|
||||||
($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &)
|
|
||||||
}
|
|
||||||
add-zsh-hook chpwd tmux-window-name
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Starship
|
# Starship
|
||||||
export STARSHIP_CONFIG=~/.starship.toml
|
export STARSHIP_CONFIG=~/.starship.toml
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
Loading…
Reference in a new issue