Re:Ask HN: How do you sync your computer’s development confi...
by duffyjp on Thursday May 26, 2022 @09:49AM
(#31518292)
I do something similar, but even simpler. I have my entire home dir as a git repo, but my .gitignore contains a single "*". I git add files I want with a -f.
I'm gonna go though your guide later though-- I like quite a bit of what I've skimmed so far. Thanks for posting that.
Re:Ask HN: How do you sync your computer’s development confi...
by bloopernova on Thursday May 26, 2022 @09:56AM
(#31518382)
Any feedback on the guide will be gratefully received. I'm trying to write better docs to give a little back to the open source community - it's not much but it's what I can manage :)
EDIT: and that "*" for gitignore is intriguing, I'll have to take a better look at that whitelist vs blacklist setup, thank you!
Re:Ask HN: How do you sync your computer’s development confi...
by ScottEvtuch on Thursday May 26, 2022 @11:46AM
(#31519778)
I've been doing "home dir is a repo" for a while now too and I'm always surprised when people think it's weird/dangerous. I wrote a few guides with tricks on how to do it on my blog that all started with "This is probably a horrible idea but here's how to do it anyway!"
Re:Ask HN: How do you sync your computer’s development confi...
by glmdev on Thursday May 26, 2022 @05:17PM
(#31523470)
I keep a .dotfiles git-repo similarly. The configs/custom scripts/etc are organized into separate folders by what they do (shell config/work tools/...) and I use GNU Stow to symlink them into my home directory. Makes setting up super easy:
git clone <repo> .dotfiles && cd .dotfiles
stow --target=$HOME --dir=packages shell-config
stow --target=$HOME --dir=packages work-stuff
I've found this to be much more manageable than tools like yadm since I can pick-and-choose sets of configs/scripts based on the machine I'm using them on.
Re:Ask HN: How do you sync your computer’s development confi...
by vlunkr on Thursday May 26, 2022 @11:45AM
(#31519766)
This is what I've done for a long time. You get the benefits of keeping things synced and having a full history.
Re:Ask HN: How do you sync your computer’s development confi...
by intrepidhero on Thursday May 26, 2022 @09:52AM
(#31518332)
I did the same plus just a little bit of Ansible makes deployment a little nicer.
Re:Ask HN: How do you sync your computer’s development confi...
by bloopernova on Friday May 27, 2022 @06:18AM
(#31527893)
I looked into Ansible after reading your comment - I've only ever used it and Puppet for larger-scale stuff so hadn't even thought of using it as a localhost-only playbook. This looks like it could manage my symlinks for me very nicely :) Thank you!
Couple of bits from a guide I wrote recently: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b...
That OSTYPE is great for all those little bits that are unique to each operating system. The zshenv-local is in .gitignore, so you can keep tokens, api keys, etc etc in there. OSTYPE could even be used to import specific files like .zshenv-darwin or .zshenv-linux-gnuIf you're ssh'ing between your hosts, you can use something like this:
It's not fancy and doesn't use cool tools, but my setup works for me just fine.