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

Merge conditionally deployed files #54

Open
cmseeling opened this issue Jan 10, 2025 · 3 comments
Open

Merge conditionally deployed files #54

cmseeling opened this issue Jan 10, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@cmseeling
Copy link

Hey, I recently found this utility and I really like it.

I was wondering if it would be possible to somehow merge configuration files to help cut down on duplicating files and manually syncing them.

For example, in my .gitconfig file I use the git-credential-libsecret store to save my passkey on Linux, but I don't need that on my Mac because it's stored in the Apple Keychain.

So what I would like to see is something like this file structure:

dotfiles
|--Configs
   |--git
   |  |--.gitconfig
   |--git_linux
   |  |--.gitconfig
   |--git_macos
      |--.gitconfig

In Configs/git/.gitconfig I would have something like

[user]
name = username
email = email
...
# tuckr_credential

Configs/git_macos/.gitignore would be empty since I don't need that configuration option on Mac. In Configs/git_linux/.gitconfig I would have:

[credential]
helper = 'path/to/git-credential-libsecret'

Thanks!

@RaphGL
Copy link
Owner

RaphGL commented Jan 10, 2025

Hello, this is already an implemented feature. It's documented here but I forgot to write about it on the wiki page.

What is not implemented yet is doing a fallback, so if you have the same file on git and git_linux it will just symlink one of them and mark the others as conflict. I think doing the fallback thing makes sense tbh. I haven't thought of this use case before. I think it's worth investing and attempting to implement.

@RaphGL RaphGL added the enhancement New feature or request label Jan 10, 2025
@cmseeling
Copy link
Author

Thanks for replying. I did look at the conditional deployment and I'm using it for some things. The fallback is exactly what I'm looking for so I can maintain one file for the majority of the configuration that is shared between machines and then have a few very small other files for OS specific values.

@RaphGL
Copy link
Owner

RaphGL commented Jan 10, 2025

I see, makes sense. Only this last year people have started to use my tool, even though I've been using it myself for 3 years. So there's these small holes in how tuckr behaves and how people expect it to behave, since I was only working on whatever affected my own use cases.

I'll definitely take a look at how I can add this. I think adding this and coupling it with this suggestion can massively reduce the amount of setup and files u have to keep track of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants