All you need is a symlink script that symlinks files in ~ to ~/path/to/your/dotfiles
https://github.com/pprotas/dotfiles/blob/main/symlink.sh
That's it.
I've been bikeshedding with dotfiles for 20 years and ended up with Chezmoi[0] in the end.
It came down to the fact that it's easy to install and easy to bootstrap as long as your dotfiles are in a public Github repo. It also integrates with a bunch of password managers to grab any secrets you might need in addition.
I use the "run_onchange_install-packages.sh.tmpl" to install basic packages to computers I bootstrap chezmoi on, it adapts based on the operating system using chezmoi's templating system[1]
It takes a few tries to remember the flow of "chezmoi add"ing a file after editing it so that you can push it to Github. After that it's just a matter of chezmoi update on your other computers to bring them up to date.
For .gitconfig I use a .gitconfig.local file on my work computer to override my personal credentials and not have to mess with templating the file.
[0] https://www.chezmoi.io [1] https://www.chezmoi.io/user-guide/advanced/install-packages-...
just setup a bare repo and call it a day.
https://www.atlassian.com/git/tutorials/dotfiles
original thread on HN: https://news.ycombinator.com/item?id=11070797
For me, I have found nix home manager to be the most effective solution for managing my dotfiles.
The migration process was easy, and I was able to use it to replace my sim link script with it's file directives.
It also integrates well with my Nixos Systems.
I started managing my dotfiles in git and followed the pattern I found in Anders Knudsen's repository below. The most painful thing has been coming up with config that works across Linux and MacOS, but that's been chosen pain that can easily be avoided.
Symlinks and Git. A remote like GitHub is then a minor bonus.
I didn’t store my dotfiles on GitHub because they didn’t used to have free private repositories. (Why would I share my dotfiles?)
Gnu stow has finally been updated to fix a long standing issue so I can once again wholeheartedly recommend it again! It’s lightweight and uses symlinks. Last I checked, chezmoi has a symlink mode but it’s a bit worse.
I'm currently using a git based approach for my dotfiles, similar to the one notes here[1]. I've got one significant change, though: All my dotfile management works over my cfg[2] script that helps me maintain a main branch for dotfiles for all machines and then branches that branch off of that main like 'main.arch.MACHINE_NAME' that are merged like a waterfall during sync (main -[merge]-> main.arch -[merge]-> main.arch.MACHINE_NAME). (I can also cherry pick up the waterfall)
[1]: https://www.atlassian.com/git/tutorials/dotfiles [2]: https://gist.github.com/tionis/a0f23a7a33b0e289f1b03cc6ff503...
the ultimate bikeshedding with dotfiles is home-manager with nix, an infinite cacophony of deep pain and enlightened pleasure
I'm using yadm for some years now, which works really well:
I highly recommend dotter, especially if your dotfiles have variation from machine to machine and or if you don't need all of them at a given time. It's pretty simple and lightweight
I've had really good luck with vcsh and git-crypt. vcsh can be a little awkward to use because git commands need to be scoped to the vcsh project, but you get used to it. I like having separate git repos for separate roles (e.g., fish-common, fish-personal, fish-work). Then, depending on what I'm doing on a particular machine I can pull in just the roles I need. It may seem like overkill, but I've found it very helpful in sharing my dev config without pulling personal stuff onto a work machine, vice versa.
git-crypt allows me to protect sensitive files while still tracking them in a git repo. I don't think I'd rely on it for shared projects, but it works well for me.
> Submodules make managing dotfile dependencies so much easier.
I'm impressed by the dedication of anyone who has enough dotfile config to use a submodule!
I still like Vorta for dotfiles, just because it's trivial to set up and only uses tools I already use for other things. Most of the dotfiles I want to back up have secrets, so GitHub isn't really an option.
SyncThing seems like it could work well for dotfiles too, with some kind of frontend that copied stuff to a sync folder.
The good stuff: https://dotfiles.github.io/inspiration/
This one's my favorite - has been working reliably and with barely any intervention for years now: https://github.com/andsens/homeshick
My own dotfiles: https://github.com/epiccoleman/dotfiles
1. sudo apt/dnf/zypper install stow
2. man stow
3. git init ~/dotfiles
have at'er
Previous discussion: https://news.ycombinator.com/item?id=32632533 (256 points | Aug 28, 2022 | 61 comments)
Am I missing something or is the use of "GitHub" weird here? Are they GitHub employees? None of the creators seem associated with GitHub. They're _users_ of GitHub, nothing more.
Just use your home folder as a git repo, rename .git, create alias "githome" to git cli pointing to that directory and viola, you have all you need.
What I see is a mishmash of information.
All you really need is one alias.
alias homegit="git --work-tree=$HOME --git-dir=$HOME/.dotfiles.git"
This seems overwhelming. A bunch of paths to go down. No clear recommendation.
This site seems much more like an some of the awesome-<insert tech here> repositories on github than a guide. Although it does give some extra information on the packages.
To not make it took negative. I personally use Chezmoi, which I've been super happy with. The ability to maintain files in a central repository and then pull them into the file system on an update is quite nice.
You can handle merge conflicts and whatnot between your local copy and the upstream dot files. You can opt your files into using go templates in your files which is useful when I need to maintain differences in configs between mac and linux, or in general for just storing secrets out of your dotfiles.
There are some small annoyances but overall it is the only dotfile manager, I've managed to stick with.