geerlingguy/mac-dev-playbook

document what the dotfiles thing does, or better disable by default

henning opened this issue · 6 comments

First of all, thanks for this nice thing! It's a great idea and I want to use it as much as possible for package installation.

Eventually also for the dotfiles handling, but not yet.

The dotfile role behaves strangely IMHO.

It does, without further warning, remove a users dotfiles and replace them with yours, which is, in most cases, not very desireable.

Nobody especially wants to commit stuff to git with your own email and such.
Nobody wants his .vimrc and .bash_profile and such erased and replaced with yours without further notice

This was not all very bad in my case as I tested it on a new system. And sure people should check what they run. But the documentation could still be better and defaults set so no destruction occurs.

But still, even after setting up my own fork of a dotfiles repository and having the files committed there in what seems to be the "proper" way, this functionality behaves strangely. It seems to checkout changed but not committed files again, removing all my changes.

This might be desireable on server systems, where I do not want any manual change to hang around.

On a desktop system where sometimes such a change happens, I dont want it to be reverted, but the system telling me to commit. I've seen that warning once or twice, but in other situations files have been just reverted.

I tried to set it uop and work properly with it, but I still experience strange situations, it seems to checkout directory of the dotfiles sometimes gets deleted completely, or local commits that I have not yet pushed seem to get lost.

The dotfiles workflow should be made optional, should work in a way that no changes are reverted without asking the user, and it should be documented how it is supposed to work with it properly.

Concrete questions:

  • how to disable the dotfiles management completely? (commenting out all variables did not work, just lead to run everything with defaults)
  • why does the "config.defaults.yml file set a strange default for the checkout dir (in Dropbox..)? The roles itself already has a sensible default, this additional default seems to be more a personal preference (and therefor might better go into your local config.yml)
  • do changes in the local dotfiles repository need to be pushed before being properly used?
    • or put another way: does the role always do a fresh clone of this repo or reset to the HEAD of origin/master?

Currently, it's just making me mad, getting in my way, and breaking adjustments I made to my system , rendering me unable to do my work in the most unfavorable moments (e.g. right now, when I just wanted to quickly add a brew package, and again something strange happened, and commenting out all dotfiles stuff didn't help, but only made it even worse... )

I also finally took the step to further analyze whyt happens to me again and again and put it into: geerlingguy/ansible-role-dotfiles#14

Anyway, I think this part of the playbook is very useful, though needs some time to understand and handle properly - while all the package stuff is easy to setup and get started.

So I believe this feature should be optional, and made in a way people can start using it when they find time to properly set it up.

So sorry about the Git ownership snafu—that was supposed to be fixed a while back by https://github.com/geerlingguy/mac-dev-playbook/blob/master/default.config.yml#L13

All the other dotfiles changes in the default geerlingguy/dotfiles repo are much less harmful, and can be easily switched around. The main Git configuration, however, cannot... therefore I'm removing it and will track that work in #15.

Well that's on e thing.

Still, the dotfile stuff is much harder to get right and understand how to use correctly, and theres not much documentation on how the workflow is and how one does it withput losing data as described in geerlingguy/ansible-role-dotfiles#14.

So IMHO there should be an option to completely turn it off until one knows how to do it and finds the time to figure it out.

I should at least make it disable-able. Will do that via a new configure_dotfiles variable...

Fixed via above commit. You can disable the dotfiles management by setting configure_dotfiles: no in your config.yml.

oxyc commented

One way to still commit .gitconfig is to move the author data to a .local.gitconfig sourced by adding this to the .gitconfig (since git 1.7, silently ignores unexisting files).

[include]
	# user.email, user.name, user.signingkey go in this file
	path = .local.gitconfig

And then possibly even create the .local.gitconfig file in the playbook: oxyc/mac-playbook@0dac3d3