summaryrefslogtreecommitdiff
path: root/.config/yadm/scripts
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-02-19 18:46:58 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-02-22 16:40:15 +0100
commitd4645d2c48434ba7210921a7a170596fb987db03 (patch)
tree9116640e2fd6a612fd3c7e5e01d1b3bab5b3d76c /.config/yadm/scripts
parent2daa93b9985ecb8aba6531fdd93859a8dd451be3 (diff)
[yadm] bootstrap packages for complete install
Diffstat (limited to '.config/yadm/scripts')
-rwxr-xr-x.config/yadm/scripts/bootstrap/aurutils/bootstrap28
-rwxr-xr-x.config/yadm/scripts/bootstrap/docker/bootstrap8
-rwxr-xr-x.config/yadm/scripts/bootstrap/fcitx5/bootstrap13
-rwxr-xr-x.config/yadm/scripts/bootstrap/gammastep/bootstrap13
-rwxr-xr-x.config/yadm/scripts/bootstrap/nix/bootstrap25
-rwxr-xr-x.config/yadm/scripts/bootstrap/nvim/bootstrap6
-rwxr-xr-x.config/yadm/scripts/bootstrap/packages51
-rwxr-xr-x.config/yadm/scripts/bootstrap/packages-aur41
-rwxr-xr-x.config/yadm/scripts/bootstrap/zsh/bootstrap11
9 files changed, 196 insertions, 0 deletions
diff --git a/.config/yadm/scripts/bootstrap/aurutils/bootstrap b/.config/yadm/scripts/bootstrap/aurutils/bootstrap
new file mode 100755
index 0000000..749d3d7
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/aurutils/bootstrap
@@ -0,0 +1,28 @@
+#!/bin/zsh
+
+
+REPO="[options]
+CacheDir = /var/cache/pacman/pkg
+CacheDir = /var/cache/pacman/aurutils
+CleanMethod = KeepCurrent
+
+[aurutils]
+SigLevel = Optional TrustAll
+Server = file:///var/cache/pacman/aurutils"
+
+echo $REPO | sudo tee /etc/pacman.d/aurutils
+
+if ! $(grep -Fq "aurutils" /etc/pacman.conf); then
+ echo "Include = /etc/pacman.d/aurutils" | sudo tee -a /etc/pacman.conf
+fi
+
+sudo install -d /var/cache/pacman/aurutils -o $USER
+repo-add /var/cache/pacman/aurutils/aurutils.db.tar
+sudo pacman -Syu
+
+git clone https://aur.archlinux.org/aurutils.git "$HOME/.local/cache/aurutils/git"
+cd "$HOME/.local/cache/aurutils/git"
+makepkg -irs
+
+export AUR_PAGER=nvim
+aur sync -nr aurutils
diff --git a/.config/yadm/scripts/bootstrap/docker/bootstrap b/.config/yadm/scripts/bootstrap/docker/bootstrap
new file mode 100755
index 0000000..e345abf
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/docker/bootstrap
@@ -0,0 +1,8 @@
+#!/bin/zsh
+
+
+sudo pacman -Sy \
+ docker docker-compose
+
+sudo usermod -a -G docker $USER
+sudo systemctl enable docker.service --now
diff --git a/.config/yadm/scripts/bootstrap/fcitx5/bootstrap b/.config/yadm/scripts/bootstrap/fcitx5/bootstrap
new file mode 100755
index 0000000..839510a
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/fcitx5/bootstrap
@@ -0,0 +1,13 @@
+#!/bin/zsh
+
+
+aur sync -ru fcitx5-mozc-ut
+
+sudo pacman -Sy \
+ fcitx5-mozc-ut \
+ fcitx5-qt fcitx5-gtk \
+ fcitx5-configtool
+
+sudo ln -s "$HOME/.config/fcitx5/systemd/fcitx5-user.service" /etc/systemd/user/
+sudo ln -s "$HOME/.config/fcitx5/systemd/fcitx5-user.timer" /etc/systemd/user/
+systemctl --user enable "fcitx5-user.timer" --now
diff --git a/.config/yadm/scripts/bootstrap/gammastep/bootstrap b/.config/yadm/scripts/bootstrap/gammastep/bootstrap
new file mode 100755
index 0000000..d3cedd1
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/gammastep/bootstrap
@@ -0,0 +1,13 @@
+#!/bin/zsh
+
+
+sudo pacman -Sy gammastep
+
+if [[ -f "$HOME/.password-store/latitude.gpg" ]]; then
+ sudo ln -s "$HOME/.config/gammastep/systemd/gammastep-user@.service" /etc/systemd/user/
+ systemctl --user enable "gammastep-user$(pass latitude):$(pass longitude)" --now
+else
+ echo "[gammastep] setup pass and insert latitude and longitude first to enable the service unit."
+ echo "[gammastep] press Enter to acknowledge"
+ read ACK
+fi
diff --git a/.config/yadm/scripts/bootstrap/nix/bootstrap b/.config/yadm/scripts/bootstrap/nix/bootstrap
new file mode 100755
index 0000000..f6b5e97
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/nix/bootstrap
@@ -0,0 +1,25 @@
+#!/bin/zsh
+
+
+if ! command -v nix > /dev/null 2>&1; then
+ sh <(curl -L https://nixos.org/nix/install) --daemon
+fi
+
+#sudo sed -i 's/# sandbox/sandbox/' /etc/nix/nix.conf
+
+sudo systemctl enable nix-daemon --now
+
+#sudo usermod -aG nix-users $USER
+
+echo "Create initial nix env? (will take a while) [Y/n]"
+read REPLY
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ export PATH="$PATH:/nix/var/nix/profiles/default/bin"
+ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
+ nix-channel -v --update
+ nix-env -u
+fi
+
+## nix - debug help with "nix repl ."
+echo "import <nixpkgs> {}" > "$HOME/default.nix"
diff --git a/.config/yadm/scripts/bootstrap/nvim/bootstrap b/.config/yadm/scripts/bootstrap/nvim/bootstrap
new file mode 100755
index 0000000..31261ed
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/nvim/bootstrap
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+
+sudo pacman -Sy neovim
+
+#nvim --headless '+Lazy! sync' '+qall'
diff --git a/.config/yadm/scripts/bootstrap/packages b/.config/yadm/scripts/bootstrap/packages
new file mode 100755
index 0000000..78a460e
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/packages
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+
+sudo pacman -Sy \
+ polkit man-db reflector \
+ eza ripgrep fd starship \
+ rclone fuse2 \
+ imagemagick imv \
+ pass trash-cli lftp
+
+$HOME/.local/bin/reflector-de
+
+$(dirname $BASH_SOURCE)/zsh/bootstrap
+$(dirname $BASH_SOURCE)/nvim/bootstrap
+$(dirname $BASH_SOURCE)/docker/bootstrap
+
+sudo pacman -Sy \
+ noto-fonts noto-fonts-cjk noto-fonts-emoji \
+ ttf-hack-nerd
+
+sudo pacman -Sy \
+ sway swaybg waybar wofi \
+ alacritty libnotify mako \
+ brightnessctl alsa-utils \
+ grim slurp mpv \
+ cups cups-pdf sane \
+ keepassxc wl-clipboard \
+ khal vdirsyncer
+
+echo "Install graphical applications? (could take a while) [Y/n]"
+read REPLY
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+sudo pacman -Sy \
+ qutebrowser firefox \
+ thunderbird libreoffice-fresh \
+ element-desktop telegram-desktop signal-desktop discord \
+ godot krita intellij-idea-community-edition
+fi
+
+$(dirname $BASH_SOURCE)/gammastep/bootstrap
+
+sudo systemctl enable cups.service --now
+systemctl --user enable vdirsyncer.timer --now
+
+sudo pacman -Sy \
+ xorg-xwayland \
+ i3-wm i3status xorg-xinit xorg-server \
+ feh rofi
+
+$(dirname $BASH_SOURCE)/nix/bootstrap
diff --git a/.config/yadm/scripts/bootstrap/packages-aur b/.config/yadm/scripts/bootstrap/packages-aur
new file mode 100755
index 0000000..55acf8c
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/packages-aur
@@ -0,0 +1,41 @@
+#!/bin/zsh
+
+
+ZSH_SOURCE=${(%):-%x}
+
+$(dirname $ZSH_SOURCE)/aurutils/bootstrap
+
+export AUR_PAGER=nvim
+aur sync -nr autojump
+aur sync -nr sway-services-git
+aur sync -nr nnn-nerd
+aur sync -nr sunwait
+
+sudo pacman -Sy \
+ autojump \
+ sway-services-git \
+ nnn-nerd \
+ sunwait
+
+echo "Install graphical applications from aur? (could take a while) [Y/n]"
+read REPLY
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ aur sync -nr freetube-bin
+ aur sync -nr lagrange
+ aur sync -nr localsend-bin
+ aur sync -nr moonlight-qt-bin
+
+ sudo pacman -Sy \
+ freetube-bin \
+ lagrange \
+ localsend-bin \
+ moonlight-qt-bin
+fi
+
+echo "Install japanese keyboard from aur? (will take a while) [Y/n]"
+read REPLY
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ $(dirname $ZSH_SOURCE)/fcitx5/bootstrap
+fi
diff --git a/.config/yadm/scripts/bootstrap/zsh/bootstrap b/.config/yadm/scripts/bootstrap/zsh/bootstrap
new file mode 100755
index 0000000..e01c3be
--- /dev/null
+++ b/.config/yadm/scripts/bootstrap/zsh/bootstrap
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+
+sudo pacman -Sy zsh
+
+export ZSH=$HOME/.config/zsh/ohmyzsh
+
+if [ ! -d "$ZSH" ]; then
+ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
+ mv .zshrc.pre-oh-my-zsh .zshrc
+fi