dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

How to add personal hosts to /etc/hosts?

Open lfbn opened this issue 7 years ago • 3 comments

Hi there,

I would like to add some personal hosts, but don't want them to be versioned. It makes sense to include this kind of customization? If not, we have always to manage files that should be committed and not.

Idea: add an extra file, something like /configs/hosts.custom that should be appended to /etc/hosts at the install.sh, and add that extra file to .gitignore?

lfbn avatar Apr 20 '18 09:04 lfbn

that could work--also I've migrated myself to use https://github.com/StevenBlack/hosts, which might be a better add in replacement for the hosts file in the repo...

atomantic avatar Apr 21 '18 00:04 atomantic

Hi @atomantic,

Thanks. Do you mean use that repo it in parallel? Not included, right?

Can I create a PR adding this custom hosts to install.sh?

lfbn avatar Apr 23 '18 21:04 lfbn

yeah, either it could be added as a git submodule like oh-my-zsh, or part of the install script could clone the repo and run the hosts setup. With the submodule approach, the install script should probably do a git submodule update, but with the clone on demand approach it could just clone into /tmp. Either way seems fine.

Feel free to PR it -- you'll likely get to it before I do :)

atomantic avatar Apr 27 '18 13:04 atomantic