Created installer file

main
guusvanmeerveld 3 years ago
parent fd4a4dc1dc
commit f472e1cf60

@ -0,0 +1,39 @@
#!/bin/bash
export DOTFILES=~/dotfiles
export EDITOR=micro
case $1 in
edit)
$EDITOR $DOTFILES/config/$2
;;
add)
echo " - $2" >> $DOTFILES/packages.conf.yaml
;;
install)
sudo pacman -Sy python --noconfirm
SCRIPTS=$DOTFILES/install_scripts
$SCRIPTS/pre-install
$SCRIPTS/install-packages
# if (( $3 == "applications" ))
# then
# $SCRIPTS/install-applications
# fi
$SCRIPTS/post-install
;;
*)
echo "Commands:"
echo " install installs the dotfiles"
echo " edit edit one of the config files"
echo " add add a package to the list"
;;
esac

@ -1 +0,0 @@
./install -p dotbot-yay/yay.py -p dotbot-vscode/vscode.py -c applications.conf.yaml

@ -1 +0,0 @@
./install -p dotbot-yay/yay.py -c packages.conf.yaml

@ -11,6 +11,6 @@
# System # System
/etc/pacman.conf: config/pacman.conf /etc/pacman.conf: config/pacman.conf
/bin/code: /bin/codium /bin/dotfiles: dotfiles
/usr/share/icons/default/index.theme: config/cursors.theme /usr/share/icons/default/index.theme: config/cursors.theme

@ -16,7 +16,6 @@
# Shell # Shell
~/.config/kitty/kitty.conf: config/kitty.conf ~/.config/kitty/kitty.conf: config/kitty.conf
~/.aliases: config/.aliases.sh ~/.aliases: config/.aliases.sh
~/.zshrc: config/.zshrc
~/gpg.conf: config/gpg.conf ~/gpg.conf: config/gpg.conf
~/.ssh/config: config/ssh ~/.ssh/config: config/ssh
~/.xinitrc: config/.xinitrc ~/.xinitrc: config/.xinitrc

@ -0,0 +1,12 @@
#!/bin/bash
$DOTFILES/install -p dotbot-yay/yay.py -p dotbot-vscode/vscode.py -c applications.conf.yaml
# Spotifyd
sudo systemctl enable spotifyd --machine=$USER@.host --user --now
# Syncthing
sudo systemctl enable --now syncthing@$USER
# Docker
sudo usermod -aG docker $USER

@ -0,0 +1,3 @@
#!/bin/bash
$DOTFILES/install -p dotbot-yay/yay.py -c packages.conf.yaml

@ -0,0 +1,23 @@
#!/bin/bash
# NetworkManager
sudo systemctl enable NetworkManager --now
# Flutter
sudo gpasswd -a $USER flutterusers
# sddm
sudo systemctl enable sddm
sudo cp $DOTFILES/themes/zune /usr/share/sddm/themes/ -r
# Micro
micro -plugin install quoter filemanager
# ZSH
$DOTFILES/scripts/install-z.sh
# Update user
$DOTFILES/scripts/chuser.sh
# Set locale
$DOTFILES/scripts/set_locale.sh

@ -0,0 +1,4 @@
#!/bin/bash
$DOTFILES/install
sudo $DOTFILES/install -c "install-root.conf.yaml"

@ -1,6 +0,0 @@
./pre-install
./install-packages
./install-applications
./post-install

@ -1,5 +0,0 @@
./pre-install
./install-packages
./post-install

@ -1,31 +0,0 @@
sudo systemctl enable sddm
# NetworkManager
sudo systemctl enable NetworkManager --now
# Flutter
sudo gpasswd -a $USER flutterusers
# Spotifyd
sudo systemctl enable spotifyd --machine=$USER@.host --user --now
# Syncthing
sudo systemctl enable --now syncthing@$USER
# sddm
sudo cp themes/zune /usr/share/sddm/themes/ -r
# Micro
micro -plugin install quoter filemanager
# Docker
sudo usermod -aG docker guus
# ZSH
scripts/install-z.sh
# Update user
scripts/chuser.sh
# Set locale
scripts/set_locale.sh

@ -1,2 +0,0 @@
./install
sudo ./install -c "install-root.conf.yaml"

@ -1 +1 @@
sudo chsh -s /bin/zsh guus sudo chsh -s /bin/zsh $USER

@ -5,11 +5,15 @@ else
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
fi fi
mkdir -p ~/.oh-my-zsh/custom/plugins
export PLUGINS=~/.oh-my-zsh/custom/plugins export PLUGINS=~/.oh-my-zsh/custom/plugins
export THEMES=~/.oh-my-zsh/themes export THEMES=~/.oh-my-zsh/themes
mkdir -p $PLUGINS
mkdir -p $THEMES
ln -sf $DOTFILES/config/.zshrc ~/.zshrc
# Install zsh-histdb # Install zsh-histdb
git -C $PLUGINS/zsh-histdb pull || git clone https://github.com/larkery/zsh-histdb $PLUGINS/zsh-histdb git -C $PLUGINS/zsh-histdb pull || git clone https://github.com/larkery/zsh-histdb $PLUGINS/zsh-histdb

@ -1,5 +1,5 @@
echo 'en_NL.UTF-8' > /etc/locale.gen sudo echo 'en_NL.UTF-8' > /etc/locale.gen
locale-gen sudo locale-gen
localectl set-locale en_NL.UTF-8 sudo localectl set-locale en_NL.UTF-8