mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
Split niri, hypr, fish into submodules; tmux, tmux-palette, television, yazi into externals
This commit is contained in:
1 parent
ab29365a3d
commit
954e1e1ae0
216 files changed
+138
-9708
No files matched your search
@@ -31,14 +31,48 @@ Externals are content chezmoi fetches instead of storing in the repo. Every entr
|
||||
| --- | --- | --- |
|
||||
| `~/.config/nvim` | [prdlk/nvim](https://github.com/prdlk/nvim) | Neovim config, kept in its own repo |
|
||||
| `~/.config/bat/syntaxes/sublime-purescript-syntax` | [tellnobody1/sublime-purescript-syntax](https://github.com/tellnobody1/sublime-purescript-syntax) | PureScript syntax for bat, compiled into bat's cache by the [bat cache scripts](/chezmoi/scripts#build-bat-cache) |
|
||||
| `~/.config/tmux/plugins/tpm` | [tmux-plugins/tpm](https://github.com/tmux-plugins/tpm) | tmux plugin manager, run from the bottom of `tmux.conf` ([tmux](/terminal/tmux)) |
|
||||
| `~/.config/tmux/plugins/tpm` | [tmux-plugins/tpm](https://github.com/tmux-plugins/tpm) | tmux plugin manager, run from the bottom of `tmux.conf` ([tmux](/terminal/tmux)). Cloned inside the tmux checkout, whose `.gitignore` excludes `plugins/` |
|
||||
|
||||
### No refreshPeriod
|
||||
|
||||
No entry sets `refreshPeriod`, so it stays at chezmoi's default of never. chezmoi clones each repo on a fresh machine and otherwise leaves it alone: `chezmoi apply` and `chezmoi update` do not pull. The local nvim checkout always wins over the remote, so in-progress Neovim edits and unpushed commits are never disturbed by an apply.
|
||||
No entry in `.chezmoiexternal.toml` sets `refreshPeriod`, so it stays at chezmoi's default of never. chezmoi clones each repo on a fresh machine and otherwise leaves it alone: `chezmoi apply` and `chezmoi update` do not pull. The local nvim checkout always wins over the remote, so in-progress Neovim edits and unpushed commits are never disturbed by an apply.
|
||||
|
||||
To update explicitly, run `chezmoi apply --refresh-externals` (`-R`), which pulls with `git pull --ff-only`. `--ff-only` makes the pull fail instead of creating a merge commit when the local checkout has diverged.
|
||||
|
||||
## .chezmoiexternals/ [#app-externals]
|
||||
|
||||
Per-app config repos, one file each in `.chezmoiexternals/<app>.toml`. Each is a `git-repo` external with `refreshPeriod = "168h"` and `pull.args = ["--ff-only"]`, so `chezmoi apply` fast-forwards them at most once a week. The repos hold plain config files (no chezmoi prefixes) and are not part of `chezmoi managed` contents.
|
||||
|
||||
```toml .chezmoiexternals/tmux.toml
|
||||
[".config/tmux"]
|
||||
type = "git-repo"
|
||||
url = "https://github.com/prdlk/tmux.git"
|
||||
refreshPeriod = "168h"
|
||||
[".config/tmux".pull]
|
||||
args = ["--ff-only"]
|
||||
```
|
||||
|
||||
| File | Target | Repo |
|
||||
| --- | --- | --- |
|
||||
| `tmux.toml` | `~/.config/tmux` | [prdlk/tmux](https://github.com/prdlk/tmux) |
|
||||
| `tmux-palette.toml` | `~/.config/tmux-palette` | [prdlk/tmux-palette](https://github.com/prdlk/tmux-palette) |
|
||||
| `television.toml` | `~/.config/television` | [prdlk/television](https://github.com/prdlk/television) |
|
||||
| `yazi.toml` | `~/.config/yazi` | [prdlk/yazi](https://github.com/prdlk/yazi) |
|
||||
|
||||
Edit these in place under `~/.config/<app>`, then commit and push from that checkout.
|
||||
|
||||
## Submodules [#submodules]
|
||||
|
||||
Three source directories are git submodules, listed in `.gitmodules`. They keep chezmoi source naming and are applied in symlink mode like the rest of the tree. `chezmoi init` clones them.
|
||||
|
||||
| Source | Target | Repo |
|
||||
| --- | --- | --- |
|
||||
| `dot_config/niri` | `~/.config/niri` | [prdlk/niri](https://github.com/prdlk/niri) |
|
||||
| `dot_config/hypr` | `~/.config/hypr` | [prdlk/hypr](https://github.com/prdlk/hypr) |
|
||||
| `dot_config/fish` | `~/.config/fish` | [prdlk/fish](https://github.com/prdlk/fish) |
|
||||
|
||||
Edit them inside the submodule in the chezmoi source, commit there, then commit the updated submodule pointer in the root repo.
|
||||
|
||||
## .chezmoiignore.tmpl [#chezmoiignore]
|
||||
|
||||
Patterns match target paths (relative to `$HOME`). Matching entries are neither written nor removed. The file is a template, so the desktop block appears only on machines where it applies. Source entries that start with `.` (`.github/`, `.claude/`, `.crush/`, `.gitignore`) are ignored by chezmoi without needing a rule.
|
||||
@@ -69,11 +103,12 @@ Files at the source root that would otherwise land in `$HOME` as `~/README.md`,
|
||||
| `.config/lazygit/.omc/**` | Tool state written inside the lazygit config dir |
|
||||
| `.config/tmux/plugins/**`, except `!.config/tmux/plugins/tpm` | Plugins tpm installs with `prefix I`; tpm itself is the external above |
|
||||
| `.config/fish/fish_variables` | fish universal variables, rewritten by fish at runtime |
|
||||
| `.config/fish/conf.d/secrets.fish` | Plaintext credentials. Local-only, never in git (the fish repo's `.gitignore` also lists it) |
|
||||
| `.config/nvim/lazy-lock.json` | lazy.nvim lockfile inside the nvim external |
|
||||
| `.config/nvim/.git`, `.config/nvim/.git/**` | The external's git metadata |
|
||||
| `.config/nvim/.omc/**`, `.config/nvim/.crush/**`, `.config/nvim/.understand-anything/**` | Agent tool state inside the nvim checkout |
|
||||
|
||||
`.gitignore` covers the source side of the same problem: `dot_config/lazygit/dot_omc`, `dot_config/tmux/plugins`, `/yazi/plugins/*` (except the vendored `bunny.yazi`), and `__pycache__/` never get committed even though symlink mode lets tools write into the source tree.
|
||||
`.gitignore` covers the source side of the same problem: `dot_config/lazygit/dot_omc` and `__pycache__/` never get committed even though symlink mode lets tools write into the source tree.
|
||||
|
||||
### mise
|
||||
|
||||
@@ -90,6 +125,8 @@ mise tool versions stay local to each machine and are not managed.
|
||||
{{ if or (ne .chezmoi.os "linux") (and (ne .role "desktop") (ne .role "laptop")) }}
|
||||
.config/niri
|
||||
.config/niri/**
|
||||
.config/hypr
|
||||
.config/hypr/**
|
||||
.config/noctalia
|
||||
.config/noctalia/**
|
||||
.config/niri-dynamic-workspaces
|
||||
@@ -103,11 +140,10 @@ mise tool versions stay local to each machine and are not managed.
|
||||
.local/bin/niri-launch
|
||||
.config/fish/auto-Niri.fish
|
||||
.local/bin/cp-appid
|
||||
.config/tmux/niri-title.sh
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The block is emitted, and these paths skipped, unless the OS is `linux` and the role is `desktop` or `laptop`. `mac` and `server` machines, and any non-Linux machine regardless of role, never receive the niri compositor config (`dot_config/niri/`), fontconfig (`dot_config/fontconfig/fonts.conf`), default-app associations (`dot_config/mimeapps.list`), the fish auto-start hook (`dot_config/fish/auto-Niri.fish`), the tmux window-title helper, the systemd user units (`dot_config/systemd/user/kitty-day-save.service`), or the `niri-launch`, `cp-appid` and `kitty-day-save` scripts. The `noctalia` and `niri-dynamic-workspaces` rules match nothing in the current source tree; they only take effect if those configs are added later.
|
||||
The block is emitted, and these paths skipped, unless the OS is `linux` and the role is `desktop` or `laptop`. `mac` and `server` machines, and any non-Linux machine regardless of role, never receive the niri and Hyprland configs (`dot_config/niri/`, `dot_config/hypr/`), fontconfig (`dot_config/fontconfig/fonts.conf`), default-app associations (`dot_config/mimeapps.list`), the fish auto-start hook (`dot_config/fish/auto-Niri.fish`), the systemd user units (`dot_config/systemd/user/kitty-day-save.service`), or the `niri-launch`, `cp-appid` and `kitty-day-save` scripts. The `noctalia` and `niri-dynamic-workspaces` rules match nothing in the current source tree; they only take effect if those configs are added later.
|
||||
|
||||
| Machine | Desktop layer |
|
||||
| --- | --- |
|
||||
@@ -115,7 +151,7 @@ The block is emitted, and these paths skipped, unless the OS is `linux` and the
|
||||
| Linux, `server` or `mac` | Ignored |
|
||||
| macOS or other OS, any role | Ignored |
|
||||
|
||||
See [Desktop](/desktop/niri) for what the layer contains. Gaps in the gate: the block lists `niri-launch` but not its siblings (`niri-launch-ai`, `niri-launch-browser`, `niri-launch-terminal`, `niri-launch-webapp`), and the Hyprland and waybar configs (`dot_config/hypr/`, `dot_config/waybar/`) are not gated at all, so those apply on every role. `dot_config/niri/scripts/` is covered by `.config/niri/**`.
|
||||
See [Desktop](/desktop/niri) for what the layer contains. Gaps in the gate: the block lists `niri-launch` but not its siblings (`niri-launch-ai`, `niri-launch-browser`, `niri-launch-terminal`, `niri-launch-webapp`), and the waybar config (`dot_config/waybar/`) is not gated at all, so it applies on every role. `dot_config/niri/scripts/` is covered by `.config/niri/**`.
|
||||
|
||||
### Secrets in runtime state
|
||||
|
||||
|
||||
Reference in new issue
Block a user