02b0ca610d
- resticprofile: remove all schedules (manual backups via backup-menu) - resticprofile: fix hardcoded /home/ada paths → ~/ - proj(): find git repos by .git presence up to depth 4 - bootstrap.sh: add fzf, fd, bat, ripgrep, kitty, htop to packages - README.md: rewrite for chezmoi (remove stow references) - add: htoprc, betterbird_up.sh, kitty_up.sh, tg_up.sh
92 lines
3.4 KiB
Markdown
92 lines
3.4 KiB
Markdown
# Dotfiles
|
|
|
|
Мой репозиторий конфигурационных файлов. Управляется **chezmoi**.
|
|
|
|
## Быстрый старт
|
|
|
|
```bash
|
|
git clone <repository-url> ~/dotfiles
|
|
~/.config/chezmoi/key.txt # восстановить age-ключ из Bitwarden (см. ниже)
|
|
cd ~/dotfiles && ./bootstrap.sh
|
|
```
|
|
|
|
`bootstrap.sh` устанавливает зависимости и запускает `chezmoi apply`.
|
|
|
|
## Age-ключ (шифрование секретов)
|
|
|
|
Ключ хранится в Bitwarden (`pass.ada-dev.ru`):
|
|
|
|
```bash
|
|
bw config server https://pass.ada-dev.ru
|
|
bw login
|
|
bw get item "chezmoi-age-key" | jq -r '.notes' > ~/.config/chezmoi/key.txt
|
|
chmod 600 ~/.config/chezmoi/key.txt
|
|
```
|
|
|
|
Без ключа chezmoi не расшифрует SSH-ключи и пароль restic.
|
|
|
|
## SSH-ключи
|
|
|
|
Хранятся зашифрованными в репо (`private_dot_ssh/encrypted_private_*.age`).
|
|
chezmoi расшифровывает их при `apply`. Дополнительных действий не нужно.
|
|
|
|
Если нужно добавить ключ вручную из Bitwarden:
|
|
|
|
```bash
|
|
bw get item <название> | jq -r '.sshKey.privateKey' > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
```
|
|
|
|
## Управление dotfiles
|
|
|
|
```bash
|
|
chezmoi apply # применить изменения из репо
|
|
chezmoi diff # посмотреть что изменится
|
|
chezmoi status # краткий статус
|
|
chezmoi re-add # синхронизировать после ручных правок в ~
|
|
chezmoi add ~/.some/file # начать отслеживать новый файл
|
|
```
|
|
|
|
## Резервные копии (restic)
|
|
|
|
Бэкапы запускаются вручную через `backup-menu` (алиас `bm`).
|
|
Хранилище — Яндекс.Диск через rclone remote `yadisk`, зеркало — `cloud-pc`.
|
|
|
|
| Профиль | Источник |
|
|
|---|---|
|
|
| `dotfiles` | `~/.dotfiles`, `~/.config`, `~/.ssh` |
|
|
| `projects` | `~/Documents/Projects` |
|
|
| `vaults` | `~/Documents/Vaults` |
|
|
| `files` | `~/Documents/Files` |
|
|
| `pictures` | `~/Pictures` |
|
|
|
|
```bash
|
|
bm # интерактивное меню
|
|
resticprofile -n dotfiles backup # вручную
|
|
resticprofile -n dotfiles snapshots # просмотр снапшотов
|
|
resticprofile -n dotfiles restore latest /tmp/restore
|
|
```
|
|
|
|
На новой машине нужно настроить rclone один раз:
|
|
|
|
```bash
|
|
rclone config # добавить remote 'yadisk' и 'cloud-pc'
|
|
```
|
|
|
|
## Структура репо
|
|
|
|
```
|
|
dot_config/ → ~/.config/
|
|
zsh/ → zsh конфиг (модульный, загружается из .zshrc)
|
|
nvim/ → LazyVim
|
|
kitty/ → основной терминал
|
|
alacritty/ → запасной терминал
|
|
resticprofile/ → конфиг бэкапов
|
|
...
|
|
private_dot_ssh/ → ~/.ssh/ (права 700/600, ключи зашифрованы)
|
|
dot_local/bin/ → ~/.local/bin/ (пользовательские скрипты)
|
|
dot_gitconfig → ~/.gitconfig
|
|
dot_tmux.conf.local → ~/.tmux.conf.local (кастомизация oh-my-tmux)
|
|
configs/ → служебные конфиги вне chezmoi (danted, awg, telemt)
|
|
```
|