vitorpy's Dotfiles
at main 227 lines 5.7 kB view raw view rendered
1# vitorpy's Dotfiles 2 3Managed with [chezmoi](https://www.chezmoi.io/). 4 5## Quick Start 6 7### Fresh Arch Linux Installation 8 9**Step 1: Install Arch Linux** 10 11Use the provided archinstall configuration for automated installation: 12 13```bash 14# On Arch ISO 15curl -O https://raw.githubusercontent.com/vitorpy/dotfiles/main/.config/arch/archinstall-config.json 16archinstall --config archinstall-config.json 17``` 18 19See [`ARCHINSTALL-GUIDE.md`](.config/arch/ARCHINSTALL-GUIDE.md) for detailed installation instructions. 20 21**Step 2: Bootstrap Your System** 22 23After Arch installation and first boot, run the bootstrap script to set up everything: 24 25```bash 26curl -sSL https://vitorpy.com/bootstrap.sh | bash 27``` 28 29This single command will: 30- Install chezmoi, bitwarden-cli, git, and jq 31- Configure Bitwarden for EU server 32- Clone dotfiles via HTTPS (no SSH key needed) 33- Restore SSH and GPG keys from Bitwarden 34- Switch to SSH remote 35- Install all packages from the package list 36- Enable ly display manager 37 38After the bootstrap completes: 39```bash 40cargo install hyprcorners # Install hyprcorners plugin 41sudo reboot # Reboot to start Hyprland 42``` 43 44### Manual Installation 45 46On a new machine with chezmoi already installed: 47 48```bash 49chezmoi init --apply https://tangled.sh/vitorpy.com/dotfiles 50``` 51 52Or install chezmoi and apply in one command: 53 54```bash 55sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply https://tangled.sh/vitorpy.com/dotfiles 56``` 57 58## Managed Configurations 59 60### Core System 61- **Hyprland** (`~/.config/hypr/`) - Wayland compositor configuration 62- **Waybar** (`~/.config/waybar/`) - Status bar configuration 63- **Hyprpaper** - Wallpaper daemon 64- **Hypridle** - Idle management 65- **Hyprlock** - Screen locker 66 67### Shell & Terminal 68- **Fish shell** (`~/.config/fish/`) - Shell configuration with custom functions 69- **Starship** (`~/.config/starship.toml`) - Cross-shell prompt 70- **Ghostty** (`~/.config/ghostty/config`) - Terminal emulator 71 72### Development 73- **Neovim** (`~/.config/nvim/`) - Editor configuration with plugins 74 - lazy.nvim plugin manager 75 - nvim-tree, toggleterm, zenburn theme 76 - codecompanion.nvim for AI assistance (ACP support) 77 - Custom `:IDE` command for window layout 78- **Git** (`~/.gitconfig`) - Git configuration 79 80### Theming 81- **GTK/Qt** - Dark theme configuration (Yaru) 82- **Fonts** (`~/.local/share/fonts/`) - CaskaydiaMono Nerd Fonts collection 83 84### Arch Linux Package Management 85- **Package List** (`~/.config/arch/packages.txt`) - Declarative package list 86- **Install Script** (`~/.config/arch/install-packages.sh`) - Automated installer 87 88## Arch Linux Scripts 89 90### Package Management 91 92Install all packages from the package list: 93```bash 94~/.config/arch/install-packages.sh 95``` 96 97The package list supports three sources: 98- `pacman` - Official Arch repositories 99- `aur` - Arch User Repository (via yay) 100- `flatpak` - Flatpak applications 101 102### Bitwarden Backup & Restore 103 104Backup SSH and GPG keys to Bitwarden: 105```bash 106export BW_SESSION=$(bw unlock --raw) 107~/.config/arch/backup-keys-to-bitwarden.sh 108``` 109 110Backup secrets directory to Bitwarden: 111```bash 112export BW_SESSION=$(bw unlock --raw) 113~/.config/arch/backup-secrets-to-bitwarden.sh 114``` 115 116Restore SSH and GPG keys from Bitwarden: 117```bash 118export BW_SESSION=$(bw unlock --raw) 119~/.config/arch/restore-keys-from-bitwarden.sh 120``` 121 122Test restore without affecting your system: 123```bash 124~/.config/arch/restore-keys-from-bitwarden.sh --dry-run 125``` 126 127## Daily Usage 128 129### Edit configurations 130```bash 131chezmoi edit ~/.config/hypr/hyprland.conf 132chezmoi edit ~/.config/fish/config.fish 133chezmoi edit ~/.config/nvim/init.lua 134``` 135 136### See what would change 137```bash 138chezmoi diff 139``` 140 141### Apply changes from the repo 142```bash 143chezmoi apply 144``` 145 146### Update from remote and apply 147```bash 148chezmoi update 149``` 150 151### Add new files to management 152```bash 153chezmoi add ~/.config/newconfig 154``` 155 156### Push changes to Tangled 157```bash 158chezmoi cd 159git add . 160git commit -m "Update configs" 161git push 162``` 163 164Or use the shortcut: 165```bash 166chezmoi re-add && cd $(chezmoi source-path) && git add . && git commit -m "Your message" && git push 167``` 168 169## Configuration 170 171Chezmoi is configured to use `nvim` as the default editor. Configuration file is at `~/.config/chezmoi/chezmoi.toml`. 172 173## Security Notes 174 175- SSH and GPG keys are stored in Bitwarden, not in the dotfiles repo 176- API keys are loaded from Bitwarden via `~/.config/fish/secrets.fish` 177- Never commit secrets directly to the repository 178- The dotfiles repository is public - keep it clean! 179 180## Structure 181 182- `private_dot_config/` - Maps to `~/.config/` 183- `private_dot_local/` - Maps to `~/.local/` 184- Files prefixed with `private_` are created with restricted permissions (readable only by owner) 185- Files prefixed with `executable_` are created with execute permissions 186 187## Migration Workflow 188 189### From Fedora to Arch 190 1911. **Backup** (on Fedora): 192 ```bash 193 export BW_SESSION=$(bw unlock --raw) 194 ~/.config/arch/backup-keys-to-bitwarden.sh 195 ~/.config/arch/backup-secrets-to-bitwarden.sh 196 ``` 197 1982. **Install Arch Linux** (fresh install) 199 2003. **Bootstrap** (on fresh Arch): 201 ```bash 202 curl -sSL https://vitorpy.com/bootstrap.sh | bash 203 cargo install hyprcorners 204 sudo reboot 205 ``` 206 2074. **Done!** All configs, packages, and keys restored. 208 209## Troubleshooting 210 211If configurations don't apply correctly: 212 2131. Check the diff: `chezmoi diff` 2142. Force re-apply: `chezmoi apply --force` 2153. Verify managed files: `chezmoi managed` 2164. Check chezmoi status: `chezmoi status` 217 218For package installation issues: 219```bash 220# Check package source 221yay -Ss package-name # Search AUR 222pacman -Ss package-name # Search official repos 223``` 224 225## License 226 227Personal configuration files - use at your own discretion.