From d4645d2c48434ba7210921a7a170596fb987db03 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 19 Feb 2024 18:46:58 +0100 Subject: [yadm] bootstrap packages for complete install --- .config/nvim/plugins.vim | 3 +- .config/sway/output.example | 9 +++ .config/yadm/Readme.md##distro.Arch,e.md | 19 ++++++ .config/yadm/bootstrap | 67 ++++++++-------------- .config/yadm/scripts/bootstrap/aurutils/bootstrap | 28 +++++++++ .config/yadm/scripts/bootstrap/docker/bootstrap | 8 +++ .config/yadm/scripts/bootstrap/fcitx5/bootstrap | 13 +++++ .config/yadm/scripts/bootstrap/gammastep/bootstrap | 13 +++++ .config/yadm/scripts/bootstrap/nix/bootstrap | 25 ++++++++ .config/yadm/scripts/bootstrap/nvim/bootstrap | 6 ++ .config/yadm/scripts/bootstrap/packages | 51 ++++++++++++++++ .config/yadm/scripts/bootstrap/packages-aur | 41 +++++++++++++ .config/yadm/scripts/bootstrap/zsh/bootstrap | 11 ++++ 13 files changed, 249 insertions(+), 45 deletions(-) create mode 100644 .config/sway/output.example create mode 100644 .config/yadm/Readme.md##distro.Arch,e.md create mode 100755 .config/yadm/scripts/bootstrap/aurutils/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/docker/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/fcitx5/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/gammastep/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/nix/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/nvim/bootstrap create mode 100755 .config/yadm/scripts/bootstrap/packages create mode 100755 .config/yadm/scripts/bootstrap/packages-aur create mode 100755 .config/yadm/scripts/bootstrap/zsh/bootstrap (limited to '.config') 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 {}" > "$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 -- cgit v1.2.3