working version
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
# Example working scenario
|
||||
|
||||
This folder contains a complete, practical dotfiles + bootstrap setup that exercises most `flow`
|
||||
features.
|
||||
This folder contains a complete dotfiles + bootstrap setup for the current `flow` schema.
|
||||
|
||||
## What this example shows
|
||||
|
||||
- Dotfiles repository layout with `common/` packages and `profiles/work/` overrides
|
||||
- Self-hosted `flow` config + manifest in `common/flow/.config/flow/`
|
||||
- Bootstrap profiles for Linux (auto PM detection), Ubuntu (`apt`), Fedora (`dnf`), and macOS
|
||||
(`brew`)
|
||||
- Bootstrap actions: `requires`, `hostname`, `locale`, `shell`, package install, binary install,
|
||||
`ssh_keygen`, `configs`, and `runcmd`
|
||||
- Package name mapping via `package-map` (`apt`/`dnf`/`brew`)
|
||||
- Dotfiles repo workflows: `status`, `pull`, `push`, `sync --relink`, and `edit`
|
||||
- Flat repo-root layout with reserved dirs:
|
||||
- `_shared/` (shared configs)
|
||||
- `_root/` (root-targeted configs)
|
||||
- profile dirs (`linux-auto/`, `macos-dev/`)
|
||||
- Unified YAML config under `_shared/flow/.config/flow/*.yaml`
|
||||
- Profile package list syntax: string, type prefix, and object entries
|
||||
- Binary install definition with `asset-pattern`, `platform-map`, `extract-dir`, and `install`
|
||||
- Required env vars, templating, SSH keygen, runcmd, post-link, and config skip patterns
|
||||
|
||||
## Layout
|
||||
|
||||
- `dotfiles-repo/common/flow/.config/flow/config` example `flow` config
|
||||
- `dotfiles-repo/common/flow/.config/flow/manifest.yaml` profiles + package map + binaries
|
||||
- `dotfiles-repo/common/zsh/.zshrc`, `common/git/.gitconfig`, `common/tmux/.tmux.conf`
|
||||
- `dotfiles-repo/common/nvim/.config/nvim/init.lua`
|
||||
- `dotfiles-repo/common/bin/.local/bin/flow-hello`
|
||||
- `dotfiles-repo/profiles/work/git/.gitconfig` and `profiles/work/zsh/.zshrc` overrides
|
||||
- `dotfiles-repo/_shared/flow/.config/flow/config.yaml`
|
||||
- `dotfiles-repo/_shared/flow/.config/flow/packages.yaml`
|
||||
- `dotfiles-repo/_shared/flow/.config/flow/profiles.yaml`
|
||||
- `dotfiles-repo/_shared/...`
|
||||
- `dotfiles-repo/_root/...`
|
||||
- `dotfiles-repo/linux-auto/...`
|
||||
- `dotfiles-repo/macos-dev/...`
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -35,7 +35,7 @@ Initialize and link dotfiles:
|
||||
|
||||
```bash
|
||||
flow dotfiles init --repo "$EXAMPLE_REPO"
|
||||
flow dotfiles link
|
||||
flow dotfiles link --profile linux-auto
|
||||
flow dotfiles status
|
||||
```
|
||||
|
||||
@@ -43,15 +43,15 @@ Check repo commands:
|
||||
|
||||
```bash
|
||||
flow dotfiles repo status
|
||||
flow dotfiles repo pull --relink
|
||||
flow dotfiles repo pull --relink --profile linux-auto
|
||||
flow dotfiles repo push
|
||||
```
|
||||
|
||||
Edit package or file/path targets:
|
||||
|
||||
```bash
|
||||
flow dotfiles edit zsh --no-commit
|
||||
flow dotfiles edit common/flow/.config/flow/manifest.yaml --no-commit
|
||||
flow dotfiles edit git --no-commit
|
||||
flow dotfiles edit _shared/flow/.config/flow/profiles.yaml --no-commit
|
||||
```
|
||||
|
||||
Inspect bootstrap profiles and package resolution:
|
||||
@@ -59,20 +59,13 @@ Inspect bootstrap profiles and package resolution:
|
||||
```bash
|
||||
flow bootstrap list
|
||||
flow bootstrap packages --resolved
|
||||
flow bootstrap packages --profile fedora-dev --resolved
|
||||
flow bootstrap packages --profile linux-auto --resolved
|
||||
flow bootstrap show linux-auto
|
||||
```
|
||||
|
||||
Run bootstrap in dry-run mode:
|
||||
Run bootstrap dry-run:
|
||||
|
||||
```bash
|
||||
flow bootstrap run --profile linux-auto --var TARGET_HOSTNAME=devbox --var USER_EMAIL=you@example.com --dry-run
|
||||
flow bootstrap run --profile work-linux --var WORK_EMAIL=you@company.com --dry-run
|
||||
flow bootstrap run --profile macos-dev --dry-run
|
||||
```
|
||||
|
||||
## Manifest notes
|
||||
|
||||
- `linux-auto` omits `package-manager` to demonstrate auto-detection.
|
||||
- `ubuntu-dev` uses legacy `packages.package` key to show compatibility.
|
||||
- `package-map` rewrites logical names like `fd` and `python-dev` per package manager.
|
||||
- If mapping is missing for the selected manager, `flow` uses the original package name and warns.
|
||||
|
||||
Reference in New Issue
Block a user