Ask HN: How do you sync your computer’s development configurations/environment?
61–70 of 153 posts
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#62 1. For dotfiles, YADM: https://yadm.io/
2. For everything else, like packages to install, I use an Ansible playbook.
Both sync via git.Re: Ask HN: How do you sync your computer’s development configurations/environment?
#63 # set up stuff
(
VAR=
curl
"$VAR"
brew install # or apt-get install
# ...
)
I write them so I can paste them into the shell at any time and keep my environment updated declaratively, without having to think. This way I never store any local state, not even command aliases. Otherwise I start getting attached to my setup, which leads to anxiety.It's good practice to check out a project repo periodically and see what it takes to get running inside a fresh OS or user. It's handy to do while onboarding new developers too. Sometimes I'll even put these setup instructions at the top of the project repo's readme itself, so it doesn't have a dependency on anything external.
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#64Not just with development environments, but all computer configuration, I stick with the defaults as much as possible. Instead of changing the configuration of the computer, I change myself. For example, let's say an app has a default keyboard shortcut I don't like. I won't change it. Instead, I'll just get used to it until it becomes muscle memory. Now the default configurations are my preferred configurations. Of c…
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#65I use Nix to manage: - a desktop running NixOS (primary work machine) - a Macbook (secondary/travel work machine) - a Linux VM on WSL - two servers (a raspberrypi in my closet and a Hetzner vps) I keep my config on Github (latest branch https://github.com/alexghr/nix/tree/host/vader ). I'm still new to this so a lot of my config is duplicated across different hosts but I want to refactor it to eliminate duplication.…
Coming up on my 1 year anniversary with NixOS and couldn't be happier, even though it has taken quite some time to adjust to (and I still barely know the language).
Having one place for all configurations is such a breath of fresh air, and having my work & home PC being identical (even Gnome is declaraticely configured!) is so nice.
Before NixOS, I resented using my private PC because it was never up to date with what I had configured on my work PC, but now that's just a "git pull && nixos-revuild switch --flake ." away - regardless of what has changed.
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#66I use it on windows, Debian, macos and even Chromebooks and don't have to worry about any kind of syncing. It just works
It has a built in settings sync thing, but as a general rule I strongly strongly avoid the use custom settings (in anything) to avoid the issue you are facing. There is in my experience a huge productivity gain to be had by just being pragmatic and using (and knowing) defaults in everything you use frequently, and not being a useless prima dona if your custom key bindings are missing from every single machine you need to use each day/week/month/year. We jump around servers and computers frequently, so I find it is easiest and most productive to just go with the flow and use the defaults so I can be working immediately as soon as I SSH into a new host or am given a new laptop to use for a 3 week long contract or whatever.
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#67Basically I use git for .local/dotfiles/ which are then symlinked to the relevant files like .zshrc or .emacs.d/init.el. Then I just keep that repo up to date with git pulls. Works across 2 macbooks, a Fedora workstation, and a Fedora headless server. Couple of bits from a guide I wrote recently: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b... # store stuff here that you don't want in github [[ -f $HO…
Re: Ask HN: How do you sync your computer’s development configurations/environment?
#68Basically I use git for .local/dotfiles/ which are then symlinked to the relevant files like .zshrc or .emacs.d/init.el. Then I just keep that repo up to date with git pulls. Works across 2 macbooks, a Fedora workstation, and a Fedora headless server. Couple of bits from a guide I wrote recently: https://gist.github.com/aclarknexient/0ffcb98aa262c585c49d4b... # store stuff here that you don't want in github [[ -f $HO…
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 configurations/environment?
#69Re: Ask HN: How do you sync your computer’s development configurations/environment?
#70Not just with development environments, but all computer configuration, I stick with the defaults as much as possible. Instead of changing the configuration of the computer, I change myself. For example, let's say an app has a default keyboard shortcut I don't like. I won't change it. Instead, I'll just get used to it until it becomes muscle memory. Now the default configurations are my preferred configurations. Of c…
I guess my personal strategy is to run with the defaults until you find the pain points, and install/configure something to address them. And put them in git repo if possible.