What exactly are you trying to do?
Hi! Let me first say that I really love this project.
Right now, I'm using a script that populates ~/.config/chezmoi/chezmoi.toml with a template variable, in hopes of changing .chezmoiroot according to a user's preferences. I'm curious as to whether this is currently possible.
What have you tried so far?
- My current solution is to directly write to
.chezmoiroot via my script, but I feel that a cleaner solution would be to keep the desired root with my template variables.
- I've also (somewhat desperately) tried using
.chezmoiroot.tmpl, as well as placing .chezmoiroot within the .chezmoitemplates directory.
Where else have you checked for solutions?
Output of any commands you've tried
Here is my .chezmoiroot:
And my ~/.config/chezmoi/chezmoi.toml:
[data]
shell = 'bash'
team = 'my-team'
In ~/.local/share/chezmoi I have the following:
my-team
│ dot_bashrc
│ dot_zshrc
│ .chezmoiignore
.chezmoiroot
.git/
.gitignore
install.sh
README.md
Unfortunately when I run chezmoi diff, I get
my-team/.bashrc
my-team/.zshrc
install.sh
README.md
If I change .chezmoiroot to simply say my-team, I can confirm that things work properly when I run chezmoi diff:
Let me know if anyone has input!
What exactly are you trying to do?
Hi! Let me first say that I really love this project.
Right now, I'm using a script that populates
~/.config/chezmoi/chezmoi.tomlwith a template variable, in hopes of changing.chezmoirootaccording to a user's preferences. I'm curious as to whether this is currently possible.What have you tried so far?
.chezmoirootvia my script, but I feel that a cleaner solution would be to keep the desired root with my template variables..chezmoiroot.tmpl, as well as placing.chezmoirootwithin the.chezmoitemplatesdirectory.Where else have you checked for solutions?
Output of any commands you've tried
Here is my .chezmoiroot:
And my
~/.config/chezmoi/chezmoi.toml:In
~/.local/share/chezmoiI have the following:Unfortunately when I run
chezmoi diff, I getIf I change .chezmoiroot to simply say
my-team, I can confirm that things work properly when I runchezmoi diff:Let me know if anyone has input!