diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-02-19 18:46:58 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-02-22 16:40:15 +0100 |
commit | d4645d2c48434ba7210921a7a170596fb987db03 (patch) | |
tree | 9116640e2fd6a612fd3c7e5e01d1b3bab5b3d76c | |
parent | 2daa93b9985ecb8aba6531fdd93859a8dd451be3 (diff) |
[yadm] bootstrap packages for complete install
-rw-r--r-- | .config/nvim/plugins.vim | 3 | ||||
-rw-r--r-- | .config/sway/output.example | 9 | ||||
-rw-r--r-- | .config/yadm/Readme.md##distro.Arch,e.md | 19 | ||||
-rwxr-xr-x | .config/yadm/bootstrap | 67 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/aurutils/bootstrap | 28 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/docker/bootstrap | 8 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/fcitx5/bootstrap | 13 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/gammastep/bootstrap | 13 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/nix/bootstrap | 25 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/nvim/bootstrap | 6 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/packages | 51 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/packages-aur | 41 | ||||
-rwxr-xr-x | .config/yadm/scripts/bootstrap/zsh/bootstrap | 11 | ||||
-rwxr-xr-x | .local/bin/reflector-de | 3 | ||||
-rw-r--r-- | .zshrc | 1 |
15 files changed, 252 insertions, 46 deletions
diff --git a/.config/nvim/plugins.vim b/.config/nvim/plugins.vim index 40b7f84..e91c18f 100644 --- a/.config/nvim/plugins.vim +++ b/.config/nvim/plugins.vim @@ -153,8 +153,9 @@ require('lazy').setup({ config = function() require('nvim-treesitter.configs').setup { - ensure_installed = 'all', + --ensure_installed = 'all', sync_install = false, + auto_install = false, indent = { enable = true, }, diff --git a/.config/sway/output.example b/.config/sway/output.example new file mode 100644 index 0000000..d662ea3 --- /dev/null +++ b/.config/sway/output.example @@ -0,0 +1,9 @@ +exec_always --no-startup-id $HOME/.config/sway/bin/wallpaper.py --config='{"40": {"find": "$HOME/Images/Wallpaper/some"}, "60": {"find": "$HOME/Images/Wallpaper/others", "exclude": ".+/notthese/.+"}}' --interval=600 --unique=True --consider_daylight=True --brightness_threshold=0.35 + +output HDMI-A-1 resolution 1920x1080 position 0,0 +output HDMI-A-2 resolution 1920x1080 position 1920,0 +output HDMI-A-3 resolution 1920x1080 position 3840,0 +#output eDP-1 resolution 2560x1600 scale 2 position 5760,0 +#output eDP-1 resolution 2560x1600 scale 2 position 3840,0 + +workspace 3 diff --git a/.config/yadm/Readme.md##distro.Arch,e.md b/.config/yadm/Readme.md##distro.Arch,e.md new file mode 100644 index 0000000..5aa7dbe --- /dev/null +++ b/.config/yadm/Readme.md##distro.Arch,e.md @@ -0,0 +1,19 @@ +## Arch install + +use `archinstall` + +- define `Mirrors` +- adjust `Locales` +- create `Disk configuration` +- adjust `Bootloader` +- set `Swap` to `True` +- set `Hostname` +- add `User account` +- set `Kernels` to `linux, linux-lts` +- set `Additional packages` to `openssh dhcpcd iwd yadm` +- set `Network configuration` to `Copy ISO network configuration` +- adjust `Timezone` + +``` +yadm clone https://git.dweipert.de/dotfiles +``` diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index 4ca1086..c129d07 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -1,51 +1,30 @@ -#!/bin/sh +#!/bin/bash -# # -# zsh -# # -ZSH=$HOME/.config/zsh/ohmyzsh +$(dirname $BASH_SOURCE)/scripts/bootstrap/packages +$(dirname $BASH_SOURCE)/scripts/bootstrap/packages-aur -if [ ! -d "$ZSH" ]; then - sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -fi +yadm remote set-url origin "ssh://git.dweipert.de/repositories/dotfiles" -# # -# vim -# # +echo "Bootstrapping done! Please re-log." -if command -v nvim > /dev/null 2>&1; then - nvim --headless '+Lazy! sync' '+qall' -fi +echo "Afterwards setup pass and insert the following values: +.password-store +├── latitude.gpg +├── longitude.gpg +├── radicale +│ ├── password.gpg +│ ├── url.gpg +│ └── username.gpg +└── router + ├── name.gpg + ├── passphrase.gpg + └── security.gpg +" - -# # -# gammastep -# # - -if command -v gammastep > /dev/null 2>&1; then - sudo ln -s "$HOME/.config/gammastep/systemd/gammastep-user@.service" /etc/systemd/user/ - systemctl --user enable "gammastep-user$(pass latitude):$(pass longitude)" --now -fi - -# # -# fcitx5 -# # - -if command -v fcitx5 > /dev/null 2>&1; then - 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 -fi - - -# # -# pacman -# # - -# linux-lts-versioned-bin -if [ ! -f "/usr/share/libalpm/hooks/linux-lts-versioned-bin.hook" ]; then - sudo ln -s "$HOME/.config/pacman/hooks/linux-lts-versioned-bin.hook" /usr/share/libalpm/hooks/linux-lts-versioned-bin.hook - sudo ln -s "$HOME/.config/pacman/bin/linux-lts-versioned-bin-hook" /usr/local/bin/linux-lts-versioned-bin-hook -fi +echo "Other things to setup: +- ssh keys and connections +- Thunderbird +- rclone +" 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 diff --git a/.local/bin/reflector-de b/.local/bin/reflector-de new file mode 100755 index 0000000..b22836d --- /dev/null +++ b/.local/bin/reflector-de @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo reflector --country Germany --protocol https --latest 15 --save /etc/pacman.d/mirrorlist @@ -32,7 +32,6 @@ alias nnn="nnn -a -A -d -D -i -U" # nix alias nix-shell="nix-shell --run \$SHELL" -source $HOME/.nix-profile/etc/profile.d/nix.sh # rust export RUST_DATA=~/.local/share/rust |