dotlayer 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +93 -9
  3. data/lib/dotlayer.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d30157869fd9bd7c0d98d7957fd82879a06db355368ae7a66919d43ba2dac6dc
4
- data.tar.gz: 560bf0f69bc6a68083d67739d91a97cbd3f208696313ba97f03619ccbae3901a
3
+ metadata.gz: 6153afd914718371693784c18c5be35b4f84d2b4ceddda8990efed35e54ad229
4
+ data.tar.gz: 192e9da8c37c20627151ee35dc415e1ac59eece7e27edb63bb8aac249e0defd7
5
5
  SHA512:
6
- metadata.gz: ffe27ed4bf4d65aacd1a52fc1c7697771f53b1fe69b1622a10a0789a2e01ce698d56ce6f4a485256e9b86faf5b696efe974d32dacfdfc894ddfdeb6540bb26fc
7
- data.tar.gz: 919ce9855ebfb9a7a5ba0b74c06d818f405bf843ba7505433f3529a89dc6565a5f6a04e5f8bf03853fb45f625b964b19c3e2a8686821f5fced95b7e952f2294d
6
+ metadata.gz: 401aa858f83b8f064b9c6fdf39e2621ce2c4ba53f6fa9ae2ba3e9922b7d74ea20a4bf8ab1b247f4515060d2c051ce4e89b9b7c26288e3a07e3fd581b7550f579
7
+ data.tar.gz: 6a5aa5a51170cbe973c30854f45b9e1713799cfc8d4d451e058e4a66998390f86eb656c183eda3d99baf95b2334af319cb4ae850f43e593047447e090b1115f8
data/README.md CHANGED
@@ -13,7 +13,7 @@ config-macos/ → stowed on macOS
13
13
  config-omarchy/ → stowed when Omarchy is detected
14
14
  config-omarchy-desktop/ → stowed on Omarchy + desktop profile
15
15
  config-omarchy-laptop/ → stowed on Omarchy + laptop profile
16
- config-doximity/ → stowed when doximity group is detected
16
+ config-mycompany/ → stowed when mycompany group is detected
17
17
  ```
18
18
 
19
19
  No config file needed — just name your directories and dotlayer figures out the rest.
@@ -64,7 +64,7 @@ Dotlayer auto-detects four things about your system:
64
64
  | **OS** | `RbConfig::CONFIG["host_os"]` | `linux`, `macos` |
65
65
  | **Profile** | `hostnamectl chassis` or `$DOTLAYER_PROFILE` | `desktop`, `laptop` |
66
66
  | **Distro** | Shell commands from config | `omarchy`, `fedora` |
67
- | **Group** | Shell commands from config | `doximity`, `acme` |
67
+ | **Group** | Shell commands from config | `work`, `mycompany` |
68
68
 
69
69
  It then scans your dotfiles repo for directories matching these tags and stows them in layer order:
70
70
 
@@ -72,7 +72,7 @@ It then scans your dotfiles repo for directories matching these tags and stows t
72
72
  2. **OS layer** — `config-linux` or `config-macos`
73
73
  3. **Distro layer** — `config-omarchy`
74
74
  4. **Distro + profile** — `config-omarchy-desktop`
75
- 5. **Group layer** — `config-doximity`
75
+ 5. **Group layer** — `config-mycompany`
76
76
 
77
77
  Each layer can add files but never conflict with earlier layers (Stow constraint).
78
78
 
@@ -106,8 +106,8 @@ distros:
106
106
  detect: . /etc/os-release && test "$ID" = "fedora"
107
107
 
108
108
  groups:
109
- doximity:
110
- detect: test -d ~/src/dox
109
+ mycompany:
110
+ detect: test -d ~/src/mycompany
111
111
 
112
112
  system_files:
113
113
  - source: config-linux/etc/systemd/system-sleep/xremap-restart.sh
@@ -124,9 +124,35 @@ Config file is discovered automatically from:
124
124
  - `~/.public_dotfiles/dotlayer.yml`
125
125
  - `~/.dotfiles/dotlayer.yml`
126
126
 
127
- ## Multi-repo support
127
+ ## Public and private dotfiles
128
128
 
129
- Dotlayer supports multiple repos. Each repo can have its own base packages:
129
+ Most people have two kinds of config: stuff you can share (shell aliases, editor themes, window manager rules) and stuff you can't (API keys, work credentials, employer-specific tooling). Dotlayer handles this with two repos:
130
+
131
+ ```
132
+ ~/.public_dotfiles/ ← shared on GitHub, safe for the world to see
133
+ ~/.private_dotfiles/ ← private repo (or not pushed at all)
134
+ ```
135
+
136
+ ### Why two repos?
137
+
138
+ A single dotfiles repo forces a choice: keep it private (lose the benefit of sharing) or keep it public (risk leaking secrets). Two repos solves this cleanly:
139
+
140
+ - **Public repo** — your shell, editor, git, and desktop config. Push to GitHub, share with the community, clone on any new machine.
141
+ - **Private repo** — work-specific config, API tokens, SSH configs, fonts with restrictive licenses, employer tooling. Keep in a private repo or don't push at all.
142
+
143
+ Both repos stow into the same target (`~`), so your home directory looks the same regardless of which repo a file came from.
144
+
145
+ ### Setting it up
146
+
147
+ Create both repos:
148
+
149
+ ```sh
150
+ mkdir -p ~/.public_dotfiles ~/.private_dotfiles
151
+ cd ~/.public_dotfiles && git init
152
+ cd ~/.private_dotfiles && git init
153
+ ```
154
+
155
+ Add the dotlayer config at `~/.config/dotlayer/dotlayer.yml`:
130
156
 
131
157
  ```yaml
132
158
  repos:
@@ -138,9 +164,67 @@ repos:
138
164
  - fonts
139
165
  ```
140
166
 
141
- Repos without any matching base packages automatically stow all their top-level directories (sorted alphabetically). This is useful for private repos that only contain standalone packages.
167
+ The `private: true` flag tells dotlayer which repo to use when you run `dotlayer adopt --private`.
168
+
169
+ ### What goes where?
170
+
171
+ **Public repo** — uses the standard base packages (`stow`, `bin`, `git`, `zsh`, `config`) with full layering support:
172
+
173
+ ```
174
+ ~/.public_dotfiles/
175
+ config/ ← shared config (editor, terminal, etc.)
176
+ config-linux/ ← Linux-specific overrides
177
+ config-omarchy/ ← Omarchy distro overrides
178
+ config-omarchy-desktop/ ← Omarchy + desktop profile
179
+ git/ ← git config
180
+ zsh/ ← shell config
181
+ bin/ ← personal scripts
182
+ stow/ ← stow's own config
183
+ ```
184
+
185
+ **Private repo** — can use per-repo packages for layered resolution, plus standalone directories that are all stowed automatically:
186
+
187
+ ```
188
+ ~/.private_dotfiles/
189
+ config/ ← private config overlays (SSH, API keys)
190
+ config-mycompany/ ← work-specific config (group layer)
191
+ fonts/ ← licensed fonts
192
+ fonts-linux/ ← Linux-specific font config
193
+ claude/ ← standalone: Claude AI config
194
+ work/ ← standalone: work tooling
195
+ scripts/ ← standalone: work automation scripts
196
+ ```
197
+
198
+ Directories that match the per-repo base packages (`config`, `fonts`) get full layer resolution. Everything else (`claude`, `work`, `scripts`) is stowed as-is in alphabetical order.
199
+
200
+ ### Adopting files into the right repo
201
+
202
+ ```sh
203
+ # Public config — goes to ~/.public_dotfiles
204
+ dotlayer adopt ~/.config/lazygit config
205
+
206
+ # Private config — goes to ~/.private_dotfiles
207
+ dotlayer adopt --private ~/.config/lazysql config
208
+ ```
209
+
210
+ ### Layer precedence across repos
211
+
212
+ Repos are processed in order. Public packages are stowed first, then private packages overlay on top. This means:
213
+
214
+ 1. `~/.public_dotfiles/config/` — base config (stowed first)
215
+ 2. `~/.public_dotfiles/config-linux/` — OS layer
216
+ 3. `~/.public_dotfiles/config-omarchy/` — distro layer
217
+ 4. `~/.private_dotfiles/config/` — private overlays (stowed after public)
218
+ 5. `~/.private_dotfiles/config-mycompany/` — work group layer
219
+
220
+ Each layer adds files — they never conflict because different layers use different file paths within the same directory structure.
221
+
222
+ ### Keeping private dotfiles private
223
+
224
+ Your private repo doesn't need to be pushed anywhere. It works fine as a local-only git repo for tracking changes. If you do want backup:
142
225
 
143
- Repos are processed in order packages from the first repo are stowed before packages from the second.
226
+ - Push to a **private GitHub/GitLab repo**
227
+ - Use `dotlayer update` to pull both repos at once — it runs `git pull --rebase` on each repo that has a `.git` directory
144
228
 
145
229
  ## CLI reference
146
230
 
data/lib/dotlayer.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dotlayer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
 
4
4
  autoload :CLI, "dotlayer/cli"
5
5
  autoload :Config, "dotlayer/config"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Andrade