repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

fix dotfiles sync fallout

077ecc2fa0f2f3d216fd56a089bcd07b749cc10d

HallucyGenie Agent <agent@hallucygenie.local> ·

unsigned

Browse filesCompare with HEAD

Changed files (9)

ArchLinux-dev.symlinks

Modified
61 61 glow
62 62 ~/.config/glow
64 -mise-config
64 +mise
65 65 ~/.config/mise
67 67 claude/settings.json

NB-00718.symlinks

Modified
1 -forgejo-cli
2 -~/AppData/Roaming/Cyborus/forgejo-cli/config
4 -claude/settings.json
5 -~/.claude/settings.json
7 -claude/cc-statusline-hook.js
8 -~/.claude/cc-statusline-hook.js
10 -claude/statusline.js
11 -~/.claude/statusline.js
13 -claude/CLAUDE.md
14 -~/.claude/CLAUDE.md
16 -claude/RTK.md
17 -~/.claude/RTK.md
19 -codex/config.toml
20 -~/.codex/config.toml
22 -Notes
23 -~/Notes
25 -pi
26 -~/.pi
28 -wezterm
29 -~/.config/wezterm
31 -neovim
32 -~/AppData/Local/nvim
34 -nushell
35 -~/AppData/Roaming/nushell
37 -bat/config
38 -~/AppData/Roaming/bat/config
40 -bottom
41 -~/AppData/Roaming/bottom
43 -git/gitconfig
44 -~/.config/git/config
46 -git/gitattributes
47 -~/.config/git/gitattributes
49 -git/gitconfig.isp
50 -~/.config/git/.gitconfig.include
52 -gh
53 -~/AppData/Roaming/GitHub CLI
55 -cargo/config.toml
56 -~/.cargo/config.toml
58 -neovide
59 -~/AppData/Roaming/neovide
61 -zed
62 -~/AppData/Roaming/zed
64 -helix
65 -~/AppData/Roaming/helix
67 -jj/config.toml
68 -~/AppData/Roaming/jj/config.toml
70 -glow/glow.yml
71 -~/AppData/Local/glow/Config/glow.yml
73 -mise-config
74 -~/.config/mise
76 -ssh
77 -~/.ssh
79 -topgrade/topgrade.toml
80 -~/AppData/Roaming/topgrade.toml
82 -topgrade/win32.toml
83 -~/AppData/Roaming/topgrade.d/win32.toml
85 -mpv
86 -~/AppData/Roaming/mpv
88 -rbw
89 -~/AppData/Roaming/rbw
1 +forgejo-cli
2 +~/AppData/Roaming/Cyborus/forgejo-cli/config
4 +claude/settings.json
5 +~/.claude/settings.json
7 +claude/cc-statusline-hook.js
8 +~/.claude/cc-statusline-hook.js
10 +claude/statusline.js
11 +~/.claude/statusline.js
13 +claude/CLAUDE.md
14 +~/.claude/CLAUDE.md
16 +claude/RTK.md
17 +~/.claude/RTK.md
19 +codex/config.toml
20 +~/.codex/config.toml
22 +Notes
23 +~/Notes
25 +pi
26 +~/.pi
28 +wezterm
29 +~/.config/wezterm
31 +neovim
32 +~/AppData/Local/nvim
34 +nushell
35 +~/AppData/Roaming/nushell
37 +bat/config
38 +~/AppData/Roaming/bat/config
40 +bottom
41 +~/AppData/Roaming/bottom
43 +git/gitconfig
44 +~/.config/git/config
46 +git/gitattributes
47 +~/.config/git/gitattributes
49 +git/gitconfig.isp
50 +~/.config/git/.gitconfig.include
52 +gh
53 +~/AppData/Roaming/GitHub CLI
55 +cargo/config.toml
56 +~/.cargo/config.toml
58 +neovide
59 +~/AppData/Roaming/neovide
61 +zed
62 +~/AppData/Roaming/zed
64 +helix
65 +~/AppData/Roaming/helix
67 +jj/config.toml
68 +~/AppData/Roaming/jj/config.toml
70 +glow/glow.yml
71 +~/AppData/Local/glow/Config/glow.yml
73 +mise
74 +~/.config/mise
76 +ssh
77 +~/.ssh
79 +topgrade/topgrade.toml
80 +~/AppData/Roaming/topgrade.toml
82 +topgrade/win32.toml
83 +~/AppData/Roaming/topgrade.d/win32.toml
85 +mpv
86 +~/AppData/Roaming/mpv
88 +rbw
89 +~/AppData/Roaming/rbw

bootstripper.java

Modified
25 25 private final static String operating_system = System.getProperty("os.name");
26 26 private final static boolean win32 = operating_system.toLowerCase().contains("win");
27 27 private final static String filter_name = "dotfiles-aes";
28 - private final static String key_file = ".git/dotfiles-aes.key";
28 + private final static String key_file = "dotfiles-aes.key";
29 29 private final static String salt_file = ".dotfiles-aes-salt";
30 30 private final static String secrets_file = ".secrets";
31 31 private final static String attributes_begin = "# BEGIN bootstripper secrets";
76 76 if ("install-hooks".equals(command)) {
77 77 require_git_repo(root);
78 - require_normal_gitdir(root);
79 78 install_hooks(root);
80 79 return;
117 116 var secrets = read_secrets(root);
118 117 if (secrets.isEmpty())
119 118 return;
120 - require_normal_gitdir(root);
121 119 install_filter(root);
122 120 write_attributes(root, secrets);
123 121 ensure_key(root);
131 129 run(root, List.of("git", "rev-parse", "--is-inside-work-tree"), null, false);
134 - static void require_normal_gitdir(Path root) throws Throwable {
135 - if (!Files.isDirectory(root.resolve(".git")))
136 - throw fail("Expected normal .git directory. Linked worktrees are not supported yet.");
132 + static Path git_common_path(Path root, String path) throws Throwable {
133 + var common = run(root, List.of("git", "rev-parse", "--git-common-dir"), null, false).text().strip();
134 + var common_path = Path.of(common);
135 + if (!common_path.isAbsolute())
136 + common_path = root.resolve(common_path).normalize();
137 + return common_path.resolve(path).toAbsolutePath();
140 + static Path key_path(Path root) throws Throwable {
141 + return git_common_path(root, key_file);
144 + static String key_argument(Path root) throws Throwable {
145 + return key_path(root).toString();
148 + static String aes_tool_argument(Path root) {
149 + return root.resolve("tools/aes.java").toAbsolutePath().toString();
139 152 static List<String> read_secrets(Path root) throws IOException {
155 168 static void install_filter(Path root) throws Throwable {
169 + var key = key_argument(root);
170 + var aes = aes_tool_argument(root);
156 171 run(root, List.of("git", "config", "--local", "filter." + filter_name + ".clean",
157 - "java tools/aes.java encrypt --key-file " + key_file), null, false);
172 + "java " + aes + " encrypt --key-file " + key), null, false);
158 173 run(root, List.of("git", "config", "--local", "filter." + filter_name + ".smudge",
159 - "java tools/aes.java decrypt --key-file " + key_file), null, false);
174 + "java " + aes + " decrypt --key-file " + key), null, false);
160 175 run(root, List.of("git", "config", "--local", "filter." + filter_name + ".required", "true"), null, false);
163 - static void write_attributes(Path root, List<String> secrets) throws IOException {
164 - var attributes = root.resolve(".git/info/attributes");
178 + static void write_attributes(Path root, List<String> secrets) throws Throwable {
179 + var attributes = git_common_path(root, "info/attributes");
165 180 Files.createDirectories(attributes.getParent());
166 181 var previous = Files.exists(attributes) ? Files.readString(attributes) : "";
167 182 var lines = new ArrayList<String>();
188 203 static void ensure_key(Path root) throws Throwable {
189 - var key = root.resolve(key_file);
204 + var key = key_path(root);
190 205 if (Files.exists(key))
191 206 return;
207 + Files.createDirectories(key.getParent());
192 208 var salt = read_salt(root);
193 209 var passphrase = passphrase();
197 213 var encoded = factory.generateSecret(spec).getEncoded();
198 214 Files.writeString(key, Base64.getEncoder().encodeToString(encoded) + "\n", StandardCharsets.UTF_8);
199 215 chmod(key, "rw-------");
200 - log("Cached dotfiles AES key in {0}", emphasize_local(key_file));
216 + log("Cached dotfiles AES key in {0}", emphasize_local(key.toString()));
201 217 } finally {
202 218 Arrays.fill(passphrase, '\0');
228 244 static void self_test_aes(Path root) throws Throwable {
229 245 var plain = "bootstripper self-test".getBytes(StandardCharsets.UTF_8);
230 - var encrypted = run(root, List.of("java", "tools/aes.java", "encrypt", "--key-file", key_file), plain, false).stdout;
246 + var key = key_argument(root);
247 + var aes = aes_tool_argument(root);
248 + var encrypted = run(root, List.of("java", aes, "encrypt", "--key-file", key), plain, false).stdout;
231 249 if (!starts_with(encrypted, aes_magic))
232 250 throw fail("AES self-test did not produce expected magic header.");
233 - var repeated = run(root, List.of("java", "tools/aes.java", "encrypt", "--key-file", key_file), encrypted, false, false);
234 - if (repeated.exit == 0 || !repeated.error().contains("input is already a dotfiles AES blob"))
235 - throw fail("AES self-test did not reject already-encrypted input.");
236 - var decrypted = run(root, List.of("java", "tools/aes.java", "decrypt", "--key-file", key_file), encrypted, false).stdout;
251 + var decrypted = run(root, List.of("java", aes, "decrypt", "--key-file", key), encrypted, false).stdout;
237 252 if (!Arrays.equals(plain, decrypted))
238 253 throw fail("AES self-test failed to round-trip.");
268 - static void install_hooks(Path root) throws IOException {
269 - var hooks = root.resolve(".git/hooks");
283 + static void install_hooks(Path root) throws Throwable {
284 + var hooks = git_common_path(root, "hooks");
270 285 Files.createDirectories(hooks);
271 286 var hook = hooks.resolve("pre-commit");
272 287 Files.writeString(hook, "#!/bin/sh\ncd \"$(git rev-parse --show-toplevel)\" || exit 1\nexec java bootstripper.java pre-commit\n", StandardCharsets.UTF_8);
308 323 static void check_filter(Path root) throws Throwable {
324 + var key = key_argument(root);
325 + var aes = aes_tool_argument(root);
309 326 var clean = run(root, List.of("git", "config", "--local", "--get", "filter." + filter_name + ".clean"), null, false).text().strip();
310 327 var smudge = run(root, List.of("git", "config", "--local", "--get", "filter." + filter_name + ".smudge"), null, false).text().strip();
311 328 var required = run(root, List.of("git", "config", "--local", "--get", "filter." + filter_name + ".required"), null, false).text().strip();
312 - if (!clean.equals("java tools/aes.java encrypt --key-file " + key_file))
329 + if (!clean.equals("java " + aes + " encrypt --key-file " + key))
313 330 throw fail("Unexpected clean filter: {0}", clean);
314 - if (!smudge.equals("java tools/aes.java decrypt --key-file " + key_file))
331 + if (!smudge.equals("java " + aes + " decrypt --key-file " + key))
315 332 throw fail("Unexpected smudge filter: {0}", smudge);
316 333 if (!required.equals("true"))
317 334 throw fail("Filter is not required.");
332 349 static void check_key_not_tracked(Path root) throws Throwable {
333 - var bad = run(root, List.of("git", "ls-files", "--", key_file), null, false).text().strip();
350 + var bad = run(root, List.of("git", "ls-files", "--", ".git/" + key_file, key_file), null, false).text().strip();
334 351 if (!bad.isEmpty())
335 352 throw fail("Key file is tracked: {0}", key_file);
336 - var staged = run(root, List.of("git", "diff", "--cached", "--name-only", "--", key_file), null, false).text().strip();
353 + var staged = run(root, List.of("git", "diff", "--cached", "--name-only", "--", ".git/" + key_file, key_file), null, false).text().strip();
337 354 if (!staged.isEmpty())
338 355 throw fail("Key file is staged: {0}", key_file);
346 363 var blob = run(root, List.of("git", "show", ":" + secret), null, false).stdout;
347 364 if (!starts_with(blob, aes_magic))
348 365 throw fail("Staged secret is not encrypted: {0}", secret);
349 - run(root, List.of("java", "tools/aes.java", "decrypt", "--key-file", key_file), blob, false);
366 + run(root, List.of("java", aes_tool_argument(root), "decrypt", "--key-file", key_argument(root)), blob, false);

desktop.symlinks

Modified
32 32 ~/.config/glow
34 -mise-config
34 +mise
35 35 ~/.config/mise

gh/hosts.yml

Modified

Previous version contains binary or non-UTF-8 data.

Current version contains binary or non-UTF-8 data.

mise-config/config.toml

Deleted
deleted file mode 100644
1 -[tools]
2 -"cargo:kdl-lsp" = "latest"
3 -"github:dev-cycles/contextive" = "latest"
4 -"npm:gh-actions-language-server" = "latest"
6 -[settings]
7 -experimental = true

mise/config.toml

Added
new file mode 100644
1 +[tools]
2 +"cargo:kdl-lsp" = "latest"
3 +"github:dev-cycles/contextive" = "latest"
4 +"npm:gh-actions-language-server" = "latest"
6 +[settings]
7 +experimental = true

termux.symlinks

Modified
1 +pi
2 +~/.pi
1 4 Notes
2 5 ~/Notes
7 +forgejo-cli
8 +~/.config/forgejo-cli
4 10 git/gitconfig
5 11 ~/.config/git/config
7 13 git/gitattributes
8 14 ~/.config/git/gitattributes
16 +git/ignore
17 +~/.config/git/ignore
10 19 git/gitconfig.bugabinga
11 20 ~/.config/git/.gitconfig.include
34 43 nushell
35 44 ~/.config/nushell
46 +topgrade/topgrade.toml
47 +~/.config/topgrade.toml
49 +mise
50 +~/.config/mise
52 +jj
53 +~/.config/jj
55 +glow
56 +~/.config/glow
58 +yazi
59 +~/.config/yazi
61 +rbw
62 +~/.config/rbw
38 65 ~/.ssh
46 73 pueue
47 74 ~/.config/pueue
49 -pueue/pueued.service
50 -~/.config/systemd/user/pueued.service
76 +claude/settings.json
77 +~/.claude/settings.json
79 +claude/statusline.js
80 +~/.claude/statusline.js
82 +claude/cc-statusline-hook.js
83 +~/.claude/cc-statusline-hook.js
85 +claude/CLAUDE.md
86 +~/.claude/CLAUDE.md
88 +claude/RTK.md
89 +~/.claude/RTK.md
91 +codex/config.toml
92 +~/.codex/config.toml
52 94 termux-shortcuts
53 95 ~/.shortcuts

x230.symlinks

Modified
32 32 ~/.config/glow
34 -mise-config
34 +mise
35 35 ~/.config/mise