-
Notifications
You must be signed in to change notification settings - Fork 49
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
[FEATURE] setup scripts #116
Comments
I can see this being useful. Do you have a more specific idea of how this would look? And an example for how you would use it :) |
For me personally, an use case would be to separate my BetterDiscord configs into another repository since the frequent commits would just clutter up the main one. In that case, I'd have the package be a command package that runs something like this git clone https://example.com/my-repo BetterDiscordConfigs
cd BetterDiscordConfigs
# run the binary in the main repo but with the config from the BD repo
# this is done because dotter handles symlinking wayyy better than I could do myself
../dotter deploy The configuration could roughly look like this: [betterdiscord.scripts]
setup = "./betterdiscord/setup.sh" This would also allow to add further scripts like pre- and post deploy hooks on a per-package basis (which could be super useful) at a later point. Another use case: patching existing files. |
I like it. For implementation, would probably work to add No need for complex "update/create/delete" infrastructure like for files IMO, can just write the current packages after a deploy to it. Do we want templating support for the setup/teardown script? Then we need to render it similar to deploy scripts. |
Any plans on this feature being added? I would love to be able to install the dotter binary on recently imaged linux boot, clone the dotfiles repo and have my entire setup complete. Something like
Which would check for the install before going ahead. Awesome work on the repo btw |
What I've done is add a script that is deployed by
|
Just to chime in, I've been using dotter for vscode's dev-container feature and it's been great so far. As part of that it has a set of file names that it will execute by default. I normally use this to simply install the plugin managers that my dotfiles use after running dotter, similarly to the post deploy hook. The manager already has the feature for hooks, would be nice to have independent hooks for each package, especially if we could template them. |
Is your feature request related to a problem? Please describe.
As my used programs grow larger, I need to run plenty of setup scripts. These can be rather cumbersome.
Another idea I had was to put some dotfiles that get updated way more regularly and thus would only clutter up your main dotfiles repo in another one. However, that requires additional effort.
Describe the solution you'd like
A
setup
configuration option for every package that allows you to run scripts when deployed for ex. for the first time (saved to cache)This would also allow "script-only" packages that make it possible to configure things in a much more generic way (as in, you can not only symlink and copy whole files but also make scripts that configure applications via their CLI and such)
Describe alternatives you've considered
Have pre and post deploy hooks with package granularity
If we can come up with a concept that we're happy with I'd be happy to try and implement this and make a PR.
You did say that handling system packages is out of scope, but I think this feature would allow the creation of bridges between dotter and external programs that can handle that or something completely else.
The text was updated successfully, but these errors were encountered: