mirror of
https://github.com/joshuadavidthomas/dotfiles.git
synced 2025-07-07 20:55:01 +00:00
adjust arch bootstrap
This commit is contained in:
parent
92fa7fe58d
commit
9ba4ad5355
17 changed files with 275 additions and 192 deletions
27
.config/yadm/bootstrap.d/arch/02-core → .config/yadm/bootstrap.d/arch/01-base
Executable file → Normal file
27
.config/yadm/bootstrap.d/arch/02-core → .config/yadm/bootstrap.d/arch/01-base
Executable file → Normal file
|
@ -4,17 +4,34 @@ set -oue pipefail
|
|||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
sudo pacman -S --needed --noconfirm git base-devel
|
||||
|
||||
command -v yay >/dev/null 2>&1 || {
|
||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||
cd /tmp/yay
|
||||
makepkg -si --noconfirm
|
||||
cd -
|
||||
rm -rf /tmp/yay
|
||||
}
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
blueberry \
|
||||
btop \
|
||||
cups \
|
||||
cups-filters \
|
||||
cups-pdf \
|
||||
curl \
|
||||
inetutils \
|
||||
keyd \
|
||||
man \
|
||||
power-profiles-daemon \
|
||||
python-gobject \
|
||||
unzip
|
||||
unzip \
|
||||
wget
|
||||
|
||||
# Enable keyd service
|
||||
if pacman -Qq keyd &>/dev/null; then
|
||||
systemctl enable --now keyd || true
|
||||
fi
|
||||
sudo systemctl enable --now keyd.service
|
||||
sudo systemctl enable --now bluetooth.service
|
||||
sudo systemctl enable --now cups.service
|
||||
|
||||
# Setting the performance profile can make a big difference. By default, most systems seem to start in balanced mode,
|
||||
# even if they're not running off a battery. So let's make sure that's changed to performance.
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
sudo pacman -S --needed --noconfirm git base-devel
|
||||
|
||||
check_command yay || {
|
||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||
cd /tmp/yay
|
||||
makepkg -si --noconfirm
|
||||
cd -
|
||||
rm -rf /tmp/yay
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
atuin \
|
||||
bat \
|
||||
btop \
|
||||
curl \
|
||||
direnv \
|
||||
eza \
|
||||
fastfetch \
|
||||
fd \
|
||||
flyctl \
|
||||
fzf \
|
||||
git-delta \
|
||||
github-cli \
|
||||
inetutils \
|
||||
jq \
|
||||
just \
|
||||
lazydocker \
|
||||
lazygit \
|
||||
less \
|
||||
llvm \
|
||||
man \
|
||||
neovim \
|
||||
plocate \
|
||||
ripgrep \
|
||||
starship \
|
||||
tailscale \
|
||||
tldr \
|
||||
unzip \
|
||||
wget \
|
||||
whois \
|
||||
zoxide
|
||||
|
||||
rm -rf ~/.config/nvim
|
||||
git clone https://github.com/joshuadavidthomas/nvim ~/.config/nvim
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
clipse \
|
||||
wl-clip-persist \
|
||||
wl-clipboard
|
|
@ -5,4 +5,27 @@ set -oue pipefail
|
|||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
fish
|
||||
atuin \
|
||||
bat \
|
||||
btop \
|
||||
clipse \
|
||||
eza \
|
||||
fastfetch \
|
||||
fd \
|
||||
fish \
|
||||
fzf \
|
||||
git-delta \
|
||||
less \
|
||||
neovim \
|
||||
plocate \
|
||||
ripgrep \
|
||||
starship \
|
||||
tailscale \
|
||||
tldr \
|
||||
whois \
|
||||
wl-clip-persist \
|
||||
wl-clipboard \
|
||||
zoxide
|
||||
|
||||
rm -rf ~/.config/nvim
|
||||
git clone https://github.com/joshuadavidthomas/nvim ~/.config/nvim
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
ghostty \
|
||||
wezterm
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
BACKGROUNDS_DIR=~/.local/share/backgrounds/
|
||||
|
||||
mkdir -p "$BACKGROUNDS_DIR/tokyo-night"
|
||||
|
||||
curl -sL -o "$BACKGROUNDS_DIR/tokyo-night/1-Pawel-Czerwinski-Abstract-Purple-Blue.jpg" https://images.unsplash.com/photo-1651870364199-fc5f9f46ac85
|
||||
curl -sL -o "$BACKGROUNDS_DIR/tokyo-night/2-Milad-Fakurian-Abstract-Purple-Blue.jpg" https://images.unsplash.com/photo-1620207418302-439b387441b0
|
|
@ -5,14 +5,8 @@ set -oue pipefail
|
|||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
blueberry \
|
||||
adobe-source-code \
|
||||
brightnessctl \
|
||||
cups \
|
||||
cups-filters \
|
||||
cups-pdf \
|
||||
evince \
|
||||
file-roller \
|
||||
gnome-calculator \
|
||||
gnome-themes-extra \
|
||||
hypridle \
|
||||
hyprland \
|
||||
|
@ -23,29 +17,69 @@ yay -S --noconfirm --needed \
|
|||
hyprpolkitagent \
|
||||
hyprshot \
|
||||
imv \
|
||||
inter-font \
|
||||
kvantum-qt5 \
|
||||
nautilus \
|
||||
noto-fonts \
|
||||
noto-fonts-cjk \
|
||||
noto-fonts-emoji \
|
||||
noto-fonts-extra \
|
||||
pamixer \
|
||||
pavucontrol \
|
||||
playerctl \
|
||||
qt5-wayland \
|
||||
qt6-wayland \
|
||||
swaync \
|
||||
sushi \
|
||||
system-config-printer \
|
||||
ttf-dejavu \
|
||||
ttf-fira-code \
|
||||
ttf-font-awesome \
|
||||
ttf-hack \
|
||||
ttf-jetbrains-mono \
|
||||
ttf-liberation \
|
||||
ttf-nerd-fonts-symbols \
|
||||
ttf-nerd-fonts-symbols-mono \
|
||||
ttf-roboto \
|
||||
ttf-symbols \
|
||||
waybar \
|
||||
wireplumber \
|
||||
wofi \
|
||||
xdg-desktop-portal-hyprland \
|
||||
xdg-desktop-portal-gtk
|
||||
|
||||
BACKGROUNDS_DIR=~/.local/share/backgrounds/
|
||||
|
||||
mkdir -p "$BACKGROUNDS_DIR/tokyo-night"
|
||||
|
||||
curl -sL -o "$BACKGROUNDS_DIR/tokyo-night/1-Pawel-Czerwinski-Abstract-Purple-Blue.jpg" https://images.unsplash.com/photo-1651870364199-fc5f9f46ac85
|
||||
curl -sL -o "$BACKGROUNDS_DIR/tokyo-night/2-Milad-Fakurian-Abstract-Purple-Blue.jpg" https://images.unsplash.com/photo-1620207418302-439b387441b0
|
||||
|
||||
mkdir -p ~/.local/share/fonts
|
||||
|
||||
if ! fc-list | grep -qi "CaskaydiaMono Nerd Font"; then
|
||||
cd /tmp
|
||||
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaMono.zip
|
||||
unzip CascadiaMono.zip -d CascadiaFont
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Regular.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Bold.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Italic.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-BoldItalic.ttf ~/.local/share/fonts
|
||||
rm -rf CascadiaMono.zip CascadiaFont
|
||||
cd -
|
||||
fi
|
||||
|
||||
if ! fc-list | grep -qi "iA Writer Mono S"; then
|
||||
cd /tmp
|
||||
wget -O iafonts.zip https://github.com/iaolo/iA-Fonts/archive/refs/heads/master.zip
|
||||
unzip iafonts.zip -d iaFonts
|
||||
cp iaFonts/iA-Fonts-master/iA\ Writer\ Mono/Static/iAWriterMonoS-*.ttf ~/.local/share/fonts
|
||||
rm -rf iafonts.zip iaFonts
|
||||
cd -
|
||||
fi
|
||||
|
||||
fc-cache -fv
|
||||
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
|
||||
# Start Hyprland on first session
|
||||
echo "[[ -z \$DISPLAY && \$(tty) == /dev/tty1 ]] && exec Hyprland" >~/.bash_profile
|
||||
|
||||
# Turn on bluetooth by default
|
||||
sudo systemctl enable --now bluetooth.service
|
||||
|
||||
sudo systemctl enable --now cups.service
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -Sy --noconfirm --needed \
|
||||
adobe-source-code \
|
||||
inter-font \
|
||||
noto-fonts \
|
||||
noto-fonts-cjk \
|
||||
noto-fonts-emoji \
|
||||
noto-fonts-extra \
|
||||
ttf-dejavu \
|
||||
ttf-fira-code \
|
||||
ttf-font-awesome \
|
||||
ttf-hack \
|
||||
ttf-jetbrains-mono \
|
||||
ttf-liberation \
|
||||
ttf-nerd-fonts-symbols \
|
||||
ttf-nerd-fonts-symbols-mono \
|
||||
ttf-roboto \
|
||||
ttf-symbols
|
||||
|
||||
mkdir -p ~/.local/share/fonts
|
||||
|
||||
if ! fc-list | grep -qi "CaskaydiaMono Nerd Font"; then
|
||||
cd /tmp
|
||||
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaMono.zip
|
||||
unzip CascadiaMono.zip -d CascadiaFont
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Regular.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Bold.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-Italic.ttf ~/.local/share/fonts
|
||||
cp CascadiaFont/CaskaydiaMonoNerdFont-BoldItalic.ttf ~/.local/share/fonts
|
||||
rm -rf CascadiaMono.zip CascadiaFont
|
||||
cd -
|
||||
fi
|
||||
|
||||
if ! fc-list | grep -qi "iA Writer Mono S"; then
|
||||
cd /tmp
|
||||
wget -O iafonts.zip https://github.com/iaolo/iA-Fonts/archive/refs/heads/master.zip
|
||||
unzip iafonts.zip -d iaFonts
|
||||
cp iaFonts/iA-Fonts-master/iA\ Writer\ Mono/Static/iAWriterMonoS-*.ttf ~/.local/share/fonts
|
||||
rm -rf iafonts.zip iaFonts
|
||||
cd -
|
||||
fi
|
||||
|
||||
fc-cache -fv
|
|
@ -14,8 +14,7 @@ yay -S --noconfirm --needed \
|
|||
lazydocker \
|
||||
lazygit \
|
||||
llvm \
|
||||
mise \
|
||||
tldr
|
||||
mise
|
||||
|
||||
# Limit log size to avoid running out of disk
|
||||
# echo '{"log-driver":"json-file","log-opts":{"max-size":"10m","max-file":"5"}}' | sudo tee /etc/docker/daemon.json
|
26
.config/yadm/bootstrap.d/arch/50-applications
Executable file
26
.config/yadm/bootstrap.d/arch/50-applications
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
1password \
|
||||
1password-cli \
|
||||
evince \
|
||||
file-roller \
|
||||
gnome-calculator \
|
||||
libreoffice-fresh \
|
||||
nautilus \
|
||||
obs-studio \
|
||||
obsidian \
|
||||
signal-desktop \
|
||||
slack-desktop \
|
||||
spotify \
|
||||
sushi \
|
||||
teams-for-linux \
|
||||
typora \
|
||||
vlc \
|
||||
webcord \
|
||||
xournalpp \
|
||||
zoom
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
1password \
|
||||
1password-cli \
|
||||
evince \
|
||||
libreoffice-fresh \
|
||||
obsidian \
|
||||
typora \
|
||||
xournalpp
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
signal-desktop \
|
||||
slack-desktop \
|
||||
teams-for-linux \
|
||||
webcord \
|
||||
zoom
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -oue pipefail
|
||||
|
||||
source "$(dirname "$0")/../utils"
|
||||
|
||||
yay -S --noconfirm --needed \
|
||||
spotify \
|
||||
obs-studio \
|
||||
vlc
|
|
@ -5,5 +5,8 @@ set -oue pipefail
|
|||
# Clean package cache
|
||||
paccache -r -k 2 2>/dev/null || true
|
||||
|
||||
# Remove orphan packages
|
||||
yay -Qtdq | yay -Rns -
|
||||
|
||||
# Update mlocate database
|
||||
updatedb 2>/dev/null || true
|
||||
|
|
151
.config/yadm/bootstrap.d/arch/NOTES.md
Normal file
151
.config/yadm/bootstrap.d/arch/NOTES.md
Normal file
|
@ -0,0 +1,151 @@
|
|||
# Arch Bootstrap Scripts Organization
|
||||
|
||||
Since yadm already handles the dotfiles, the bootstrap scripts focus on:
|
||||
1. Installing packages the configs expect
|
||||
2. Enabling services
|
||||
3. Setting up accounts/logins
|
||||
4. Downloading external resources (fonts, wallpapers)
|
||||
|
||||
## Bootstrap Process (7-8 Scripts)
|
||||
|
||||
A pragmatic approach with clear functional layers:
|
||||
|
||||
```
|
||||
01-base # yay + system essentials (audio, network, bluetooth)
|
||||
10-shell # fish, CLI tools, terminal emulators
|
||||
20-desktop # Complete Hyprland + utilities + fonts/themes
|
||||
30-development # All dev tools, languages, containers
|
||||
40-browsers # Just browsers
|
||||
50-apps # All user apps (productivity, communication, media)
|
||||
99-finalize # Cleanup, first-run wizard, enable services
|
||||
```
|
||||
|
||||
### 01-base - System Foundation
|
||||
|
||||
**Purpose**: Install package manager and essential system components
|
||||
|
||||
**Packages**:
|
||||
- Build tools: git, base-devel (for yay)
|
||||
- Core utilities: curl, wget, unzip, zip, man-db, man-pages, openssh, rsync
|
||||
- System tools: htop, btop, ncdu, tree, lsof, strace
|
||||
- Key remapping: keyd
|
||||
- Audio: pipewire, pipewire-alsa, pipewire-jack, pipewire-pulse, wireplumber, pamixer
|
||||
- Bluetooth: bluez, bluez-utils
|
||||
- Printing: cups, system-config-printer
|
||||
- Power: power-profiles-daemon, thermald (laptops)
|
||||
|
||||
**Actions**:
|
||||
- Install yay from AUR
|
||||
- Configure pacman (color, parallel downloads)
|
||||
- Enable services: bluetooth, cups, systemd-timesyncd, keyd
|
||||
- Set up audio (pipewire user services)
|
||||
|
||||
### 10-shell - Terminal Environment
|
||||
|
||||
**Purpose**: Everything needed for a productive shell/CLI workflow
|
||||
|
||||
**Packages**:
|
||||
- Shell: fish, tmux, starship
|
||||
- Core tools: git, neovim, ripgrep, fd, fzf, sd, jq, yq
|
||||
- Better tools: bat, eza, zoxide, dust, duf, bottom, procs
|
||||
- Network tools: httpie, xh, curlie, bandwhich, gping
|
||||
- Additional: atuin, direnv, tealdeer, hyperfine, tokei
|
||||
|
||||
**Actions**:
|
||||
- Set fish as default shell: `chsh -s /usr/bin/fish`
|
||||
- Initialize zoxide database
|
||||
- Install tealdeer pages: `tldr --update`
|
||||
- Optional: atuin login if credentials provided
|
||||
|
||||
### 20-desktop - Complete Desktop Environment
|
||||
|
||||
**Purpose**: Full Hyprland desktop with all utilities and appearance
|
||||
|
||||
**Packages**:
|
||||
- Core: hyprland, hypridle, hyprlock, hyprpaper, waybar, wofi
|
||||
- Qt/Wayland: qt5-wayland, qt6-wayland
|
||||
- Portals: xdg-desktop-portal-hyprland, xdg-desktop-portal-gtk
|
||||
- Terminal emulators: ghostty-git, wezterm, kitty
|
||||
- Clipboard: clipse, wl-clipboard, wl-clip-persist
|
||||
- Screenshots: grim, slurp, swappy
|
||||
- Notifications: swaync
|
||||
- File manager: nautilus, nautilus-open-any-terminal, sushi
|
||||
- Utilities: hyprpicker, hyprpolkitagent, brightnessctl, playerctl, pavucontrol
|
||||
- System fonts: ttf-liberation, noto-fonts, noto-fonts-emoji, noto-fonts-cjk
|
||||
- Nerd fonts: ttf-cascadia-code-nerd, ttf-firacode-nerd, ttf-font-awesome
|
||||
- Theme: GTK theme (Tokyo Night/Catppuccin), papirus-icon-theme, capitaine-cursors
|
||||
- Qt theming: qt5ct, qt6ct, kvantum
|
||||
|
||||
**Actions**:
|
||||
- Create ~/.bash_profile for Hyprland auto-start on tty1
|
||||
- Download wallpapers to ~/Pictures/Wallpapers
|
||||
- Run `fc-cache -fv` for fonts
|
||||
- Set environment variables for Wayland
|
||||
- Configure xdg-user-dirs
|
||||
|
||||
### 30-development - Development Tools
|
||||
|
||||
**Purpose**: Complete development environment
|
||||
|
||||
**Packages**:
|
||||
- Languages: mise-bin (manages node, python, rust, go via .tool-versions)
|
||||
- Git tools: git-delta, lazygit, github-cli, glab
|
||||
- Build tools: just, make, cmake, meson, ninja
|
||||
- Containers: docker, docker-compose, lazydocker, dive
|
||||
- Cloud: kubectl, k9s, helm, terraform, flyctl, awscli
|
||||
- Database: postgresql-client, redis, sqlite
|
||||
- Additional: pre-commit, watchexec, entr
|
||||
|
||||
**Actions**:
|
||||
- Run `mise install` to set up languages
|
||||
- Install global packages: npm install -g pnpm yarn
|
||||
- Add user to docker group
|
||||
- Enable docker service
|
||||
|
||||
### 40-browsers - Web Browsers
|
||||
|
||||
**Purpose**: Web browsers (simple and focused)
|
||||
|
||||
**Packages**: firefox, chromium, vivaldi
|
||||
|
||||
### 50-apps - User Applications
|
||||
|
||||
**Purpose**: All productivity, communication, and media apps
|
||||
|
||||
**Productivity**:
|
||||
- Password: 1password, 1password-cli
|
||||
- Office: libreoffice-fresh
|
||||
- Notes: obsidian
|
||||
- PDF: zathura, zathura-pdf-mupdf
|
||||
- Email: thunderbird
|
||||
- Calculator: gnome-calculator
|
||||
|
||||
**Communication**:
|
||||
- signal-desktop, discord, slack-desktop
|
||||
- zoom, teams-for-linux
|
||||
|
||||
**Media**:
|
||||
- Audio: spotify, spotify-tui, ncspot
|
||||
- Video: vlc, mpv, obs-studio
|
||||
- Graphics: gimp, inkscape
|
||||
- Tools: yt-dlp, ffmpeg
|
||||
|
||||
### 99-finalize - System Finalization
|
||||
|
||||
**Purpose**: Clean up and prepare for first use
|
||||
|
||||
**Actions**:
|
||||
- Clean package cache: `yay -Sc --noconfirm`
|
||||
- Remove orphans: `yay -Qtdq | yay -Rns -`
|
||||
- Update mlocate database: `sudo updatedb`
|
||||
- Enable user services (syncthing, atuin sync if configured)
|
||||
- Launch first-run wizard for account setups
|
||||
- Create ~/.config/first-run-complete marker
|
||||
- Offer reboot prompt
|
||||
|
||||
## Key Principles
|
||||
|
||||
1. **Idempotent**: All scripts can be run multiple times safely
|
||||
2. **Progressive**: Each script builds on the previous to create complete layers
|
||||
3. **Modular**: Skip sections you don't need (e.g., skip 30-development)
|
||||
4. **Clear dependencies**: Desktop needs shell, development needs desktop, etc.
|
Loading…
Add table
Add a link
Reference in a new issue