Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple source directories #3719

Closed
2 of 3 tasks
lutzky opened this issue Apr 26, 2024 · 2 comments
Closed
2 of 3 tasks

Multiple source directories #3719

lutzky opened this issue Apr 26, 2024 · 2 comments
Labels
support Support request

Comments

@lutzky
Copy link

lutzky commented Apr 26, 2024

What exactly are you trying to do?

I would like to use chezmoi for work, and keep the work-specific files in an internal git repo at work (I'd like to avoid even the names of the files being public). Others at work seem to have used rcm's support for multiple DOTFILES_DIRS for this, and I'm looking to replicate this with chezmoi.

What have you tried so far?

What seems to work

Basically this:

alias chezvous "chezmoi -S ~/.local/share/chezmoi_work"

(My french is too rusty to tell me if chezvous or cheztoi would be better, but I'm thinking I'd like to visually distinguish the two 🤷 )

This seems hacky, however, and I was hoping to learn if there's a cleaner recommended method.

Things that don't quite fit the bill

  • Externals don't seem like they'd let me chezmoi edit the relevant files.
  • Completely separate repos don't let me share common things (of which there are many); the same thing seem to apply to branch-based solutions

Where else have you checked for solutions?

Output of any commands you've tried with --verbose flag

n/a

Output of chezmoi doctor

n/a

Additional context

n/a

@lutzky lutzky added the support Support request label Apr 26, 2024
@halostatue
Copy link
Collaborator

This is a "layered" approach, described nicely in #2574. I believe that Install Doctor (#3659) is doing something similar, but at the same time very different.

@lutzky
Copy link
Author

lutzky commented Apr 27, 2024

Nice. I think this kinda validates my approach. Te implementation details of #2574 are such that, for my limited purposes, I'll go with just having two simultaneous-but-separate chezmoi configs with a cheztoi alias (similar to their czb). Thank you for showing me this!

@lutzky lutzky closed this as completed Apr 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
support Support request
Projects
None yet
Development

No branches or pull requests

2 participants