mdespuits / dotify

A CLI Tool for managing your dotfiles.
http://mattdbridges.github.com/dotify
MIT License
158 stars 10 forks source link

Configurable environment values #14

Closed danielbayerlein closed 9 years ago

danielbayerlein commented 12 years ago

Hi, any idea how make values configurable in dotfiles?

For example the .gitconfig. In the work I've a other email address than at home.

[user]
  name = ...
  email = ...
mdespuits commented 12 years ago

I think I understand your meaning, but could you elaborate further on the use case?

danielbayerlein commented 12 years ago

No problem. I host my dotfiles on GitHub and I use this at home and at work. But i think most people have different settings for work and home, for example the mail address in the .gitconfig. @ryanb managed this issue in his dotfiles with erb templates and keyboard entry.

My thought: I can manage the environment and the values in the .dotrc and replace the values with dotify setup. The dotfile has a placeholder for the value.

It's just a thought. :wink:

mdespuits commented 12 years ago

@danielbayerlein Yes, I started this whole project in trying to make @ryanb's solution more robust. As I have the same personal and work credentials, it wasn't an issue for me, but I did wonder if this would come up again. I have almost wondered if some other solution would be better than manually editing them myself. I like the idea and will look for a strong solution within the next few weeks.

danielbayerlein commented 12 years ago

@mattdbridges :+1:

mdespuits commented 12 years ago

@danielbayerlein Quick idea to bounce off you. What do you think of moving the configuration into a ruby file instead of a yaml file? It would make configuration a little easier to manage and you could (in theory) take advantage of Ruby methods and abilities instead of messing with yaml. I would love to do this for myself, but I wouldn't want to make any presumptions...

danielbayerlein commented 12 years ago

@mattdbridges Oh yes, i like your idea!

mdespuits commented 12 years ago

See the CHANGELOG for upcoming work on this issue.

kylewest commented 12 years ago

Check out how we handled it in the YADR project. https://github.com/skwp/dotfiles#user-info

The .gitconfig doesn't include any user information. That info is set in a ~/.secrets file that is included by zshrc. You end up with a file that isn't part of the repo, but you probably don't want your GitHub credentials in the repo anyway.

Kyle

mdespuits commented 12 years ago

@danielbayerlein Much has changed in Dotify behind the scenes in the last several weeks. I have been working on a complete rewrite of the codebase for potential extensibility as well as cleaner code. This feature is not currently at the forefront of priorities, but I'm hoping that this could be added in the future.

At the moment, the DSL that I am implementing currently detects general OSese for platform-specific symlinks. This same pattern could potentially be used on a per-computer (same platform) basis as you suggest. I will follow up with ideas and more details as I get farther along.

Cheers!

funglaub commented 11 years ago

Really cool idea

+1

svenwin commented 11 years ago

This idea is really awesome!

+1

danielbayerlein commented 9 years ago

I close the issue because this repo is no longer maintained.