Skip to content

Commit fc81433

Browse files
committed
2 parents 99ff6d2 + c6236eb commit fc81433

10 files changed

Lines changed: 303 additions & 15 deletions

File tree

‎.vitepress/config.mts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default defineConfig({
6262
items: [
6363
{ text: 'Overview', link: '/archive' },
6464
{ text: 'st terminal', link: '/archive/terminal' },
65+
{ text: 'instantARCH', link: '/archive/instantarch' },
6566
{ text: 'imosid', link: '/archive/imosid' },
6667
{ text: 'instantTHEMES', link: '/archive/instantthemes' },
6768
{ text: 'Terminal Theme', link: '/archive/terminaltheme' },

‎archive/instantarch.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Legacy: `instantARCH` (bash)
2+
3+
`instantARCH` is the older bash-based installer built around `instantmenu`. It
4+
is still what the `instantos.io/install` script runs and what older instantOS
5+
ISOs ship with.
6+
7+
- Run from an Arch live ISO with `bash <(curl -L instantos.io/install)`
8+
- Debug mode: set `INSTALLDEBUG=1` or create `/tmp/installdebug`
9+
- Optional log tag: put an identifier in `/tmp/debugname`
10+
11+
For deeper development notes, see [instantARCH development docs](/development/instantARCH).
12+

‎docs/hotkeys.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ They are just for reference, to properly learn instantOS, refer to the documenta
55

66
You can access this list by pressing super+F1
77

8+
9+
::: info
10+
These apply only to the custom window manager/compositor instantWM, which is in
11+
an experimental state right now.
12+
:::
13+
14+
15+
816
## General
917

1018
| Binding | Functionality |

‎docs/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ it if you prefer that.
1111

1212
- [Keybindings](hotkeys.md)
1313
- [ins CLI reference](ins.md)
14+
- [resolvething duplicate and Syncthing conflict cleanup](resolvething.md)
1415
- [WM configuration](wmsettings.md)
1516
- [instantwmctl reference](instantwmctl.md)
1617
- [Programs overview](programs.md)

‎docs/ins.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Some larger `ins` subcommands already have dedicated pages:
99
- [ins game](insgame.md)
1010
- [ins video](insvideo.md)
1111
- [ins assist](instantassist.md)
12+
- [ins resolvething](resolvething.md)
1213

1314
This page documents the remaining core commands that were only mentioned indirectly in the site before.
1415

@@ -19,6 +20,7 @@ The current instantCLI build exposes these main command groups:
1920
- `arch`
2021
- `dot`
2122
- `game`
23+
- `resolvething`
2224
- `doctor`
2325
- `dev`
2426
- `launch`

‎docs/insarch.md‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,3 @@ Show the post-install menu (reboot, shutdown, or continue in live session).
105105
- `/etc/instant/questions.toml` stores the generated installation answers
106106
- `/var/log/instantos/install.log` captures the installer logs
107107

108-
## Legacy: `instantARCH` (bash)
109-
110-
`instantARCH` is the older bash-based installer built around `instantmenu`. It
111-
is still what the `instantos.io/install` script runs and what older instantOS
112-
ISOs ship with.
113-
114-
- Run from an Arch live ISO with `bash <(curl -L instantos.io/install)`
115-
- Debug mode: set `INSTALLDEBUG=1` or create `/tmp/installdebug`
116-
- Optional log tag: put an identifier in `/tmp/debugname`
117-
118-
For deeper development notes, see [instantARCH development docs](/development/instantARCH).

‎docs/insdot.md‎

Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,124 @@ ins dot add --all .ssh --force
150150
`--force` only affects the current add operation. It does not change the
151151
contents of any `.insignore` file.
152152

153+
## Encrypted dotfiles (age)
154+
155+
`ins dot` supports storing tracked sources as `*.age` files while applying
156+
plaintext to the normal target path in your home directory.
157+
158+
Example source/target mapping:
159+
160+
```text
161+
repo: dots/.config/app/secrets.toml.age
162+
target: ~/.config/app/secrets.toml
163+
```
164+
165+
### 1. Initialize a local identity
166+
167+
```bash
168+
ins dot key init
169+
```
170+
171+
This creates a local age identity at `~/.config/instant/age/identity`.
172+
173+
Identity discovery checks these sources (in priority order):
174+
175+
1. **`$AGE_IDENTITY`** — colon-separated paths to identity files (highest priority)
176+
2. **`age_identity_files`** — list of identity file paths in `~/.config/instant/dots.toml`
177+
3. **`~/.config/instant/age/identity`** — single identity file from `ins dot key init`
178+
4. **`~/.config/instant/age/identities/*`** — every file in the identities directory
179+
180+
`ins dot key identity` prints the machine's public key(s) from any of the
181+
above paths.
182+
183+
### 2. Authorize recipients in the repository
184+
185+
Each repo stores allowed public keys in `instantdots.toml` under
186+
`age_recipients`.
187+
188+
```bash
189+
# Authorize this machine's local public key in the first writable repo
190+
ins dot key authorize
191+
192+
# Or choose a specific repo
193+
ins dot key authorize --repo my-dots
194+
195+
# Authorize an explicit key
196+
ins dot key authorize "age1..."
197+
```
198+
199+
### 3. Encrypt/decrypt tracked sources
200+
201+
```bash
202+
# Convert tracked plaintext source -> .age source
203+
ins dot encrypt ~/.config/app/secrets.toml
204+
205+
# Convert tracked .age source -> plaintext source
206+
ins dot decrypt ~/.config/app/secrets.toml
207+
208+
# Preview either operation
209+
ins dot encrypt ~/.config/app/secrets.toml --dry-run
210+
ins dot decrypt ~/.config/app/secrets.toml --dry-run
211+
```
212+
213+
Use `--repo <name>` and `--subdir <name>` when the target has multiple possible
214+
sources.
215+
216+
Important behavior:
217+
218+
- `ins dot encrypt` encrypts the **tracked source content** (repository source
219+
is the source of truth), not arbitrary unstaged target edits.
220+
- If the target exists and has local modifications, encrypt/decrypt aborts so
221+
changes are not lost.
222+
- Both commands stage repository file changes (`old` removed, `new` added).
223+
- Encrypting does **not** erase old plaintext from git history.
224+
- Decrypting creates plaintext in the repository; committing that exposes
225+
secrets.
226+
227+
### 4. Add new files as encrypted sources
228+
229+
```bash
230+
# Add a new untracked file directly as encrypted source
231+
ins dot add ~/.config/app/secrets.toml --encrypt
232+
233+
# Add all untracked files under a directory as encrypted sources
234+
ins dot add ~/.config/app --all --encrypt
235+
```
236+
237+
For already tracked encrypted files, normal `ins dot add <path>` updates the
238+
source by re-encrypting the current target content with the repo's configured
239+
recipients.
240+
241+
### 5. Rotate/inspect key authorization
242+
243+
```bash
244+
# Show this machine's local public key(s)
245+
ins dot key identity
246+
247+
# Show recipient/decryption status
248+
ins dot key status
249+
ins dot key status --repo my-dots
250+
251+
# Replace recipients and re-encrypt all tracked .age files in that repo
252+
ins dot key rotate --repo my-dots --recipients "age1newrecipient..."
253+
```
254+
255+
`rotate` and `authorize` both verify you can decrypt existing encrypted files
256+
before rewriting them.
257+
258+
### Apply/status/diff behavior with encrypted sources
259+
260+
- `ins dot apply` decrypts encrypted sources to targets when an identity is
261+
available.
262+
- If identity/decryption is unavailable, encrypted files are skipped and shown
263+
as `identity_required` in status.
264+
- Non-identity encrypted failures (e.g. malformed ciphertext) are shown as
265+
`encrypted_error` in status.
266+
- `ins dot reset` also decrypts encrypted sources back to targets.
267+
- `ins dot diff` decrypts source content to a temp plaintext file for
268+
comparison when possible.
269+
- `ins dot merge` currently does not support encrypted (`.age`) sources.
270+
153271

154272
## Interactive menu
155273

@@ -223,6 +341,12 @@ ignored_paths = [
223341
"~/.ssh",
224342
"~/.gnupg"
225343
]
344+
345+
# Extra age identity files for decrypting encrypted dotfiles
346+
# (loaded after $AGE_IDENTITY, before the default paths)
347+
age_identity_files = [
348+
"~/.config/instant/age/work-key"
349+
]
226350
```
227351

228352
### instantdots.toml
@@ -236,6 +360,9 @@ description = "My configs" # optional
236360
read_only = true # optional, prevents modifications to this repo
237361
dots_dirs = ["dots", "themes"] # optional, defaults to ["dots"]
238362
default_active_subdirs = ["dots"] # optional, specifies which dirs are active by default
363+
age_recipients = [ # optional, recipients for encrypted dotfiles
364+
"age1..."
365+
]
239366
```
240367

241368
The `dots_dirs` field defines which subdirectories contain dotfiles. This enables:
@@ -406,4 +533,3 @@ dotfiles from multiple different repositories, something which Stow supports
406533
very well by accident.
407534

408535

409-

‎docs/resolvething.md‎

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# ins resolvething
2+
3+
`ins resolvething` helps clean up directories that are synced with Syncthing. It has two jobs:
4+
5+
- find duplicate files and move the redundant copies to trash
6+
- find Syncthing conflict files and open them next to the original file in a diff editor
7+
8+
It is designed for folders where Syncthing can leave files such as `note.sync-conflict-20240101-ABC.md` or redundant copies in `.stversions`.
9+
10+
## Quick start
11+
12+
Open the interactive menu:
13+
14+
```bash
15+
ins resolvething menu
16+
```
17+
18+
Run both cleanup steps for every configured scan directory:
19+
20+
```bash
21+
ins resolvething all
22+
```
23+
24+
Preview what would happen before changing files:
25+
26+
```bash
27+
ins resolvething all --dry-run
28+
```
29+
30+
Run against one directory without changing the saved configuration:
31+
32+
```bash
33+
ins resolvething all --dir ~/wiki/vimwiki --dry-run
34+
```
35+
36+
## Scan directories
37+
38+
`resolvething` reads its configuration from:
39+
40+
```bash
41+
~/.config/instant/resolvething.toml
42+
```
43+
44+
The default configuration scans `~/wiki/vimwiki` and treats `md` and `json` files as mergeable conflict files.
45+
46+
Use the menu to add or edit scan directories:
47+
48+
```bash
49+
ins resolvething menu
50+
```
51+
52+
Or inspect and edit the config directly:
53+
54+
```bash
55+
ins resolvething config show
56+
ins resolvething config edit
57+
```
58+
59+
Example config:
60+
61+
```toml
62+
scan_dirs = [
63+
{ path = "~/wiki/vimwiki", extensions = ["md", "json"] },
64+
{ path = "~/Documents/notes", extensions = ["txt", "md"] },
65+
]
66+
67+
# Optional. Defaults to $EDITOR, then nvim.
68+
editor_command = "nvim"
69+
```
70+
71+
`extensions` controls conflict-file handling. Use an empty list to scan all plain text files in that scan directory.
72+
73+
## Duplicate cleanup
74+
75+
```bash
76+
ins resolvething duplicates
77+
ins resolvething duplicates --dry-run
78+
ins resolvething duplicates --dir ~/wiki/vimwiki
79+
```
80+
81+
This command uses `fclones` to group identical files. Redundant files are moved to trash, not permanently deleted.
82+
83+
Some groups can be resolved automatically:
84+
85+
- conflict-file duplicates keep a non-conflict file when one exists, otherwise the newest conflict file
86+
- duplicate files inside `.stversions` keep the newest version snapshot
87+
- groups with one regular file and matching `.orig` or `.tmp` copies keep the regular file
88+
- groups made only of `.tmp` files keep one copy
89+
90+
Ambiguous groups open an interactive picker where you choose which file to keep. Use `--no-auto` to force interactive selection even for groups that are normally safe to resolve automatically.
91+
92+
Use `--show-ignored` to list duplicate groups that were deliberately skipped, such as normal live-file plus `.stversions` snapshot pairs.
93+
94+
## Syncthing conflict cleanup
95+
96+
```bash
97+
ins resolvething conflicts
98+
ins resolvething conflicts --dry-run
99+
ins resolvething conflicts --dir ~/wiki/vimwiki
100+
```
101+
102+
This command looks for Syncthing conflict filenames, reconstructs the original path, and opens both files in a diff editor. After the editor exits, `resolvething` compares the two files:
103+
104+
- if the original and conflict file now match, the conflict file is moved to trash
105+
- if they still differ, the conflict is left in place
106+
- missing, binary, or very large files are skipped
107+
108+
By default the diff editor is `$EDITOR -d`, falling back to `nvim -d`. Set `editor_command` in the config if you want a different editor command.
109+
110+
## Menu
111+
112+
```bash
113+
ins resolvething menu
114+
ins resolvething menu --gui
115+
```
116+
117+
The menu shows every configured scan directory with current duplicate and conflict counts. From there you can:
118+
119+
- resolve everything for one directory
120+
- resolve only duplicates or only conflicts
121+
- open the directory
122+
- edit the conflict extensions
123+
- change or remove the scan directory
124+
- add another scan directory
125+
126+
`--gui` opens the menu in a GUI terminal window.
127+
128+
## Command reference
129+
130+
```bash
131+
ins resolvething duplicates [--dir <path>] [--no-auto] [--show-ignored] [--dry-run]
132+
ins resolvething conflicts [--dir <path>] [--dry-run]
133+
ins resolvething all [--dir <path>] [--no-auto] [--show-ignored] [--dry-run]
134+
ins resolvething menu [--gui]
135+
ins resolvething config show
136+
ins resolvething config edit
137+
```
138+
139+
## Dependencies
140+
141+
Duplicate cleanup requires `fclones`. The interactive flows use `fzf`. If a dependency is missing, `ins` will try to install it through the supported package managers.
142+
143+
Files are moved to trash using `trash`, `gio trash`, or a fallback trash directory under the user data directory.

‎documentation.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ it if you prefer that.
3535
### Power-User Features
3636

3737
- [instantASSIST](https://instantos.io/youtube/assist)
38+
- [resolvething duplicate and Syncthing conflict cleanup](https://instantos.io/docs/resolvething)
3839
- [quickmenu](https://instantos.io/youtube/quickmenu)
3940
- [visibility options](https://instantos.io/youtube/visibility)
4041
- [customizing](https://instantos.io/youtube/customize)

‎faq.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ everything else the Arch repos are used.
3939

4040
## Can I install instantos on an encrypted drive
4141

42-
Yes, you can, but it will be a bit of work.
43-
The installer does not currently support setting up encryption for you.
44-
So you will have to select the manual partitioning option and set it up yourself including bootloader setup.
42+
Yes. During an `ins arch install` with automatic partitioning, the installer
43+
asks whether you want to enable disk encryption. It uses **LUKS on LVM** with
44+
a dedicated LUKS container, LVM volume group (`instantOS`), and separate
45+
logical volumes for swap and root. Encryption is handled automatically —
46+
partitioning, luksFormat, LVM setup, mkinitcpio hooks (`sd-encrypt`), and
47+
GRUB boot parameters are all configured for you.
48+
49+
If you prefer to set it up manually, select manual partitioning instead.
4550

4651
## How do I install instantOS software on a regular Arch
4752

0 commit comments

Comments
 (0)