dotfiles/install.sh

56 lines
1.7 KiB
Bash
Raw Normal View History

2021-03-20 22:36:25 +00:00
#/bin/bash
REPO_DIR=$(dirname $(readlink -f $0))
HOME_DIR=${HOME}
workspace_link() {
mkdir -p $(dirname $HOME_DIR/$2)
2021-03-20 22:36:25 +00:00
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
}
2024-01-29 23:30:26 +00:00
# On host we only install minimal dependencies.
# Mostly just GUI applications.
echo "==[host] Installing rpm-os tree packages"
2024-01-31 13:41:56 +00:00
rpm-ostree install --idempotent --apply-live --allow-inactive -y \
2024-01-29 23:30:26 +00:00
git git-lfs \
2024-01-31 13:41:56 +00:00
kitty zsh \
podman-docker
2024-01-29 23:30:26 +00:00
echo "==[host] Installing flatpaks"
2024-01-31 12:29:11 +00:00
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2024-01-31 13:41:56 +00:00
flatpak install -y --user \
com.bitwarden.desktop \
md.obsidian.Obsidian \
org.mozilla.firefox \
org.mozilla.Thunderbird \
org.gnome.Builder \
com.vscodium.codium
2024-01-29 23:30:26 +00:00
echo "==[host] Installing Nix"
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
echo "==[host] Installing Home Manager"
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
2024-01-30 18:35:52 +00:00
2024-01-29 23:30:26 +00:00
nix-shell '<home-manager>' -A install
2024-01-30 18:35:52 +00:00
workspace_link nix/home.nix .config/home-manager/home.nix
2024-01-29 23:30:26 +00:00
echo "==[host] Installing Home Manager packages"
home-manager switch
echo "==[host] Use zsh as default shell"
sudo chsh $USER --shell=/bin/zsh
2024-01-31 12:29:11 +00:00
echo "==[host] Plug for neovim"
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
2024-01-29 23:30:26 +00:00
echo "==[host] Installing fonts"
2023-04-18 20:09:46 +00:00
HOME_FONTS_DIR="${HOME_DIR}/.local/share/fonts"
2023-04-18 18:20:18 +00:00
mkdir -p ${HOME_FONTS_DIR}
2023-04-18 18:39:55 +00:00
rm -rf ${HOME_FONTS_DIR}/dotfiles-fonts
2023-04-18 18:20:18 +00:00
git clone --depth 1 git@github.com:mentos1386/dotfiles-fonts.git ${HOME_FONTS_DIR}/dotfiles-fonts
fc-cache