Closed HolbyFPV closed 1 year ago
When you say setup, are you referring to installation of chezmoi, or installation of dotfiles?
What happens when you provide input to the prompt in your output example?
What are the contents of .chezmoi.toml.tmpl
?
When you say setup, are you referring to installation of chezmoi, or installation of dotfiles?
What happens when you provide input to the prompt in your output example?
What are the contents of
.chezmoi.toml.tmpl
?
I'm not really sure, I've never used this before and so far I'm suspecting that chezmoi itself isn't installed correctly.
I have ran
winget install twpayne.chezmoi
and it was successful. So I tried to start a repo to start syncing my dotfiles, the docs say run chezmoi init
and that's where I start running into problems. I have pasted the logs from that above.
My use case is I have a bunch of dotfiles that I tried manually syncing between differing PCs through a repo/symlinks, but ran into the need for templating, which led me to this. However, I can't get it to work at all.
As far as I can tell, .chezmoi.toml.tmpl
does not exist for me.
When you run chezmoi init
, chezmoi executes its config template if present (among other things). The output you provided shows that chezmoi is executing its config template (C:/Users/username/.local/share/chezmoi/.chezmoi.toml.tmpl
). The template contains a prompt for an email address, which is what can be seen on the last line.
When you run
chezmoi init
, chezmoi executes its config template if present (among other things). The output you provided shows that chezmoi is executing its config template (C:/Users/username/.local/share/chezmoi/.chezmoi.toml.tmpl
). The template contains a prompt for an email address, which is what can be seen on the last line.
[data]
email = "{{ $email }}"
[genericSecret]
command = "secret-rot13"
This is the contents of my file. I filled in my email address and I still get the same error.
When trying to add my first file, this is what I get
$ chezmoi add /d/Code/.dotfiles/Vivaldi/Preferences --debug
2023-06-23T23:38:05-04:00 INF persistentPreRunRootE args=["C:\\Users\\username\\bin\\chezmoi.exe","add","D:/Code/.dotfiles/Vivaldi/Preferences","--debug"] goVersion=go1.20.5 version={"builtBy":"goreleaser","commit":"473189051ec4950baa342f19ae7a824f0c1ded1f","date":"2023-06-17T00:54:14Z","version":"2.34.2"}
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.config/chezmoi/chezmoistate.boltdb
2023-06-23T23:38:05-04:00 ERR Mkdir error="mkdir C:/Users/username/.local/share/chezmoi: Cannot create a file when that file already exists." component=system name=C:/Users/username/.local/share/chezmoi perm=511
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.local/share/chezmoi
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.local/share/chezmoi/.git
2023-06-23T23:38:05-04:00 ERR Mkdir error="mkdir C:/Users/username/.local/share/chezmoi: Cannot create a file when that file already exists." component=system name=C:/Users/username/.local/share/chezmoi perm=511
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.local/share/chezmoi
2023-06-23T23:38:05-04:00 ERR ReadFile error="open C:/Users/username/.local/share/chezmoi/.chezmoiroot: The system cannot find the file specified." component=system data= name=C:/Users/username/.local/share/chezmoi/.chezmoiroot size=0
2023-06-23T23:38:05-04:00 ERR ReadFile error="open C:/Users/username/.local/share/chezmoi/.chezmoiversion: The system cannot find the file specified." component=system data= name=C:/Users/username/.local/share/chezmoi/.chezmoiversion size=0
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.local/share/chezmoi
2023-06-23T23:38:05-04:00 INF Stat component=system name=C:/Users/username/.local/share/chezmoi
2023-06-23T23:38:05-04:00 INF ReadDir component=system name=C:/Users/username/.local/share/chezmoi
chezmoi: D:/Code/.dotfiles/Vivaldi/Preferences: not in destination directory (C:/Users/username)
Ok, so I'm noticing I can add files from only my home directory. The dotfiles I want to add exist in other directories though, only a few of my programs use the true home directory. Does chezmoi support this kind of a use case?
Can I use chezmoi to manage files outside my home directory?
Ahh, I must have missed that. Having some trouble getting that method to work. Is there an example somewhere on github that I can reference?
https://github.com/felipecrs/dotfiles and https://github.com/nandalopes/dotfiles both use this technique.
Appreciate the reference. I don't think this will be a good fit for me on Windows with how many apps utilize AppData over the home directory. Thanks for your time @twpayne @bradenhilton
@notblam AppData is inside the home directory.
Describe the bug
I don't believe the setup is working correctly on my Windows 11 machine. I have tried the winget, chocolatey, and standalone releases and they all produce the same behavior.
To reproduce
Try to install this on Windows 11.
Expected behavior
The app Installs
Output of command with the
--verbose
flagOutput of
chezmoi doctor
Additional context
My .config folder is empty. I'm guessing the install process should have placed some files in there?