vitorpy's Dotfiles
1#!/bin/bash
2# Bootstrap script for fresh Arch Linux install
3# Usage: curl -sSL https://your-site.com/bootstrap.sh | bash
4
5set -e
6
7echo "==> Arch Linux Bootstrap Script"
8echo ""
9
10# Install essential tools
11echo "==> Installing essential packages..."
12sudo pacman -Syu --needed --noconfirm chezmoi bitwarden-cli git jq
13
14# Configure Bitwarden for EU server
15echo "==> Configuring Bitwarden..."
16bw config server https://vault.bitwarden.eu
17
18# Unlock Bitwarden
19echo "==> Unlocking Bitwarden..."
20export BW_SESSION=$(bw unlock --raw)
21
22if [ -z "$BW_SESSION" ]; then
23 echo "ERROR: Failed to unlock Bitwarden"
24 exit 1
25fi
26
27# Clone dotfiles via HTTPS (no SSH key needed yet)
28echo "==> Cloning dotfiles..."
29chezmoi init --apply https://tangled.sh/vitorpy.com/dotfiles
30
31# Restore SSH and GPG keys from Bitwarden
32echo "==> Restoring SSH and GPG keys from Bitwarden..."
33~/.config/arch/restore-keys-from-bitwarden.sh
34
35# Add SSH keys to agent
36echo "==> Adding SSH keys to ssh-agent..."
37eval "$(ssh-agent -s)"
38ssh-add ~/.ssh/github
39ssh-add ~/.ssh/id_ed25519
40
41# Switch chezmoi to SSH remote
42echo "==> Switching chezmoi remote to SSH..."
43cd $(chezmoi source-path)
44git remote set-url origin git@tangled.sh:vitorpy.com/dotfiles
45
46# Install all packages
47echo "==> Installing all packages..."
48~/.config/arch/install-packages.sh
49
50# Install ly configuration
51echo "==> Installing ly configuration..."
52~/.config/arch/install-ly-config.sh
53
54# Configure silent boot
55echo "==> Configuring silent boot..."
56~/.config/arch/configure-silent-boot.sh
57
58# Setup Docker
59echo "==> Setting up Docker..."
60~/.config/arch/setup-docker.sh
61
62# Configure keyboard layout
63echo "==> Configuring keyboard layout..."
64~/.config/arch/configure-keyboard.sh
65
66# Enable ly display manager
67echo "==> Enabling ly display manager..."
68sudo systemctl enable ly.service
69sudo systemctl disable getty@tty2.service
70
71echo ""
72echo "==> Bootstrap complete!"
73echo ""
74echo "Next steps:"
75echo " 1. Install hyprcorners: cargo install hyprcorners"
76echo " 2. Reboot to start Hyprland with ly display manager"
77echo " 3. Enjoy your system!"