Live data from Hacker News

Ask HN: How do you sync your computer’s development configurations/environment?

news.ycombinator.com

91–100 of 153 posts

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#91
I have a repository with common config files. Whenever possible I prefer to not just symlink files but instead include them (source in shell, load-file in emacs, etc). That way I can still have local variations, work-related stuff, etc.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#92

Scripting, scripting, and more scripting. I wish there were a better way, but there isn't. And it will forever be brittle, because operating systems change. With that said, here's what I do. First, I keep a personal monorepo. It not only has all my dotfiles, but also my personal website, and binary tools I've written. A game changer for me was git submodules, which let me keep third party stuff up to date with a mini…

Nix seems like the perfect match for you.

You would think.

But Nix and Guix are still very very new. Arch Linux has the best overall package management system, nothing else even comes close. Wrapping it is a way better option than trying to reinvent it from the ground up.

If Arch didn't exist, I'd lean on Debian before going Nix.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#93
My use case is simpler than yours, as I only have one personal and one work Mac, so I can get away with a manually managed dotfiles repo[0]. My work GitHub account is a collaborator on the repo so I can edit config on both machines. The actual differences in configuration are intentionally minimal and kept in separate, unversioned, optional files. This repo is the only thing shared between my personal and work machines

[0]: https://github.com/nkantar/dotfiles

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#94
I've got a fairly unique setup, and work on a Windows machine that runs my Ubuntu VM with KDE(where I do all development).

I take monthly snapshots of the VM, and carry it around on all my computers. It drifts from time to time, and I just end up just overwriting it with an older version when I fumble with some settings. Once every 3-4 years I do a clean reinstall of the VM.

I tweak a bit frequently used software like PyCharm, but aim to keep everything in stock and updated constantly.

I've not had any issues or regrets in the last 5 years and I'll carry this on indefinitely.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#95
post #70
post #9

Not 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 think there's a healthy middle ground here. Endless tweaking of settings tends to be a waste of time, but if you spend hours a day on a computer, you might as well make it comfortable. Some people use no $EDITOR plugins and wear it like a badge of honor, this is pretty silly to me. The few minutes it takes to install and learn about a plugin might save you hundreds on hours in the future. I guess my personal strate…

[deleted]

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#96
post #9

Not 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…

Yeah, my macOS set-up is simple enough it's not worth scripting or otherwise saving.

Use the GUI settings panel to make CAPS LOCK an extra ctrl. Takes maybe 10 seconds.

Use same to make dock auto-hide. 10 seconds if I'm slow about it.

Install Homebrew. Maybe 15 seconds hands-on and a couple minutes in the background.

Use Homebrew to install spectacle. Less than 5 seconds hands-on time, done less than a minute later.

Start Spectacle and use its preferences panel to set it to start on boot. Maybe 15 seconds.

Remove all the pinned programs on the dock. 60-90 seconds.

The last one's the only part I've considered scripting, but since I only do it once every couple years at most, it's not really worth it.

Once I'm past a Mac's initial "welcome to Mac" flow and on the actual desktop, I'm only about 5 minutes (not all of it actively doing things) from having a comfortable environment set up and being all ready to install project-specific tools, as needed.

If I ever switch back to Linux (or FreeBSD, which is more likely at this point) I might go back to versioning and backing up a bunch of config and dot files. I need them, there.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#97
post #96
post #9

Not 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…

Yeah, my macOS set-up is simple enough it's not worth scripting or otherwise saving. Use the GUI settings panel to make CAPS LOCK an extra ctrl. Takes maybe 10 seconds. Use same to make dock auto-hide. 10 seconds if I'm slow about it. Install Homebrew. Maybe 15 seconds hands-on and a couple minutes in the background. Use Homebrew to install spectacle. Less than 5 seconds hands-on time, done less than a minute later.…

> CAPS LOCK an extra ctrl

Another fine specimen, salute!

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#98
I use syncthing to sync my dev folders between windows, linux and mac. The mac is set up to backup to time machine and backblaze. I’ve standardized on vscode as much as possible, use settings sync to automatically sync its config between machines, and put per-project config in the project’s folders.

If I had to start over now I would consider something like github codespaces, but requiring constant internet connectivity would be enough of a downside I would land on syncthing + vscode again.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#99
I switch between MacOS, Window 10, and Linux Mint.

In each case I stick with the defaults except for minor tweaks, where I keep a Markdown bullet list - things like switching on hidden files and file extension visibility, or installing obscure things like Rectangle and Silicon Info on the Mac, or where to get my favourite fonts from (eg iA Writer Duospace). None of that is time-consuming enough to script or otherwise automate.

No need to sync anything, but to be fair I habitually reinstall the OS at least once a quarter so I'm pretty practiced at it.

Re: Ask HN: How do you sync your computer’s development configurations/environment?

#100
Ansible. I maintain 4 workstations (3 Linux, 1 Windows) from the same config. It's a bit overkill but it has the flexibility to deal with the hardware and OS differences.

Linux is essentially automatic. Install OS using custom arch-iso build. Download Ansible config repo. Run playbook.

Windows is a bit more rough. Ansible runs in WSL connecting to the host via ssh.

For work I just fork my personal config, add changes needed for work environment in a private repo. I can pull upstream changes and rebase easily.

Main downside is it's a bit verbose, and I still need manual steps to converge certain types of changes (like deleting/moving configs) because I don't want to write even more code to do that.

Having all the additional steps in a role and not just config files is extremely useful when revisiting a configuration years later.

For development, I usually just use Git to synchronize changes. Syncthing is useful sometimes.

Post reply on HN