Replies: 11 comments 28 replies
-
My suggestion for an overhaul in v3 is to move away from using file/directory name prefixes to manage source state attributes. I can see the benefits of encoding this information in the directory name as it makes these attributes more visible to the user, but it feels a bit awkward as you lose the 1:1 mapping of files from source to target and is a bit complex to understand when you start combining prefixes. I also found the Perhaps this information could be stored as a |
Beta Was this translation helpful? Give feedback.
-
Overlays / layers / workspaces. The discussion in #2771 has presented a possibly novel way of using chezmoi that I think might be worth considering for the v3 upgrade in a more formal way than simply specifying I haven’t completely thought this through, but it feels like we could come up with a way that [layers]
pre = [ "~/.config/chezmoi/pre.toml" ]
post = [ "~/.config/chezmoi/post.toml" ] We could also say that there are no layers = [
"~/.config/chezmoi/post1.toml",
"~/.config/chezmoi/post2.toml",
] Rules:
|
Beta Was this translation helpful? Give feedback.
-
Archive externals should be hardened against a possible repeat of the GitHub archive apocalypse.
This is would be helped if we had a way to resolve #2741 in code, but the correct solution (computing SHASUM over the uncompressed contents of the archive) is computationally expensive. Chezmoi would also require some protection against maliciously crafted archives (I believe that this responsibility could be pushed into the upstream dependencies used for archives). |
Beta Was this translation helpful? Give feedback.
-
Dynamic chezmoi data extensions. I have a number of things which depend on the presence of executables via
It would be useful to be able to have something like Transformed, this would look something like: [data.in_path]
delta = {{ lookPath "delta" }}
difftastic = {{ lookPath "difft" }}
gvim = {{ lookPath "gvim" }}
icdiff = {{ lookPath "icdiff" }}
ksdiff = {{ lookPath "ksdiff" }}
mvim = {{ lookPath "mvim" }}
vim = {{ lookPath "vim" }}
exiftool = {{ lookPath "exiftool" }}
pdfinfo = {{ lookPath "pdfinfo" }}
pdftotext = {{ lookPath "pdftotext" }}
djvutxt = {{ lookPath "djvutxt" }}
odt2txt = {{ lookPath "odt2txt" }} This could also be restricted to be under a specific configuration key (e.g., |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
From what I understand this isn't exactly trivial, but #2852 (or anything that implements opt-in as opposed to opt-out applying of dotfiles) would be a significant quality-of-life improvement for me. |
Beta Was this translation helpful? Give feedback.
-
Template function deprecations and removals. We would need to add ways of reporting on the use of deprecated functions (for the first few versions that a template function is deprecated, the message should only be output every Xth run or Y days, whichever is less; this would mean additional state to be tracked somehow) as well as whether there are replacements or alternatives (and document those). I was looking at the documentation for mkdocs material and saw a way to add "version" chips to template function pages, but it requires changes and other stuff that is still being researched slowly. |
Beta Was this translation helpful? Give feedback.
-
I am unconvinced of the value in this, but #3528 suggests aligning more with XDG for the chezmoi state file, and I believe things like the externals httpcache directory should also be moved if we are reviewing these. Similarly, Windows and macOS native locations for these should be considered ( |
Beta Was this translation helpful? Give feedback.
-
About your suggestions of changes to .chezmoiignore: I have multiple such files local to each directory. Would you propose that I would have to switch to a single one in the root? I find that approach awkward. Also on the topic of ignoring files: I find the logic is backwards to the way I think. E.g. "this file should only be applied on servers that aren't work related" means that I actually have to write "if not (server and not work)". Yes it can be "simplified" using DeMorgan's laws to "if not server or work", but now it is even further from how I think about it. I don't have a good suggestion for how it should work instead though. Another issue I have with chezmoi is lack of failure handling in templates. E.g., if looking up a password fails (maybe I'm applying the config over ssh), it is an error. I can't provide a default fallback. Nor can I say "if you fail, keep the current value in the system config file" (that might be hard to do in general, though chezmoi_modify_manager can do it for ini files). |
Beta Was this translation helpful? Give feedback.
-
I would like a way for modify scripts to interact with the diff process, specifically the "overwrite/keep" question. This is the biggest pain point for chezmoi_modify_manager currently. This would require chezmoi to also provide info to the modify script on what the system state looked like at last apply so I can tell where the changes come from. (Or something equivalent I guess? Not sure how chezmoi itself handles it currently.) And a way for me to signal to chezmoi that we need to prompt the user. Maybe there should be a difference between modify script and "advanced plugin" that has a more complex interaction protocol, but allows things like this? As long as I can write my code in Rust and not Go I'm game for something like that. |
Beta Was this translation helpful? Give feedback.
-
This would require a parallel file as described for path rewriting, but being able to declare multiple files as related to one another in a group might be useful. Suggested as "package name" management in #3698. |
Beta Was this translation helpful? Give feedback.
-
chezmoi v3 may or may not happen. If chezmoi v3 happens, then the goals of the v2->v3 transition will be similar to the v1->v2 transition (#654), namely:
v2 has held up well, and a lot of functionality has been added since its release two years ago.
Note that the v1->v2 internal rewrite (#654) took almost a year of calendar time, with the help of COVID-enforced isolation. Expect a similar calendar timescale for v2->v3, even though the changes should be smaller in scale.
So, that said, here are a few ideas that I have for chezmoi v3. Where there is a linked issue, please comment on the linked issue rather than this general discussion.
.chezmoiexternal
,.chezmoiignore
,.chezmoiremove
, etc.). These can be unified into a single config file. Importantly, per-entry configuration (e.g. file and directory attributes andchezmoi:template
directives) should still remain local to the file. Ref Allow.chezmoiscripts
to live out of the home directory #2585 (comment) cc @Larandar).map[path]Entry
to represent the source state. This flat representation means that there are few/no checks to see if a parent directory exists before creating a child entry. This will also make features like Rewrite target paths #2273, Add an entire directory so re-add would include new files there in the future #2298, and Download externals concurrently #2670 easier to implement.Link to all issues tagged
v3
.If you have an new idea for chezmoi v3 then please do share. If there's a relevant existing issue, then please use the existing issue. If your idea can probably be implemented in chezmoi v2 then please open a feature request instead. Otherwise, please discuss here :)
Beta Was this translation helpful? Give feedback.
All reactions