Live data from Hacker News

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

news.ycombinator.com

101–110 of 153 posts

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

#101
I'll echo the other comments recommending to stick with "defaults". However, I do like having the ability to sync my installed packages and apps across machines, so I wrote a little script to update/reinstall packages on macOS using brew: https://github.com/maxpetretta/dotfiles

Between my dotfiles and cloud storage, you could throw my laptop in a lake and I could configure a brand new machine in an hour or two.

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

#102
I use a tool called rcm[0], which is essentially a set of shell scripts for managing symlinks from $HOME into $HOME/.dotfiles. $HOME/.dotfiles can then be a git repo.

Some notes:

1. rcm lets you decide make host-specific or host-agnostic dotfiles. For example, I can declare that I want a different `.ssh/config` file for each host, and rcm will figure out which `.ssh/config` to symlink based on the current machine's hostname.

2. The installation process is very simple. It's just shell scripts, so you don't have to worry about a C/C++ compiler or having any pre-reqs installed. Operating system packages exist for the common platforms, and there's also a convenient way to "build" from source using configure && make && make install. The from source option is particularly convenient if you need to change the installation prefix to a user-writable location on a multi-user machine.

3. I use SSH Agent Forwarding[1] to avoid needing to install private keys (either new keys or copies of existing keys) on all the hosts I manage. This lets me git push and pull to my dotfiles repo on all hosts.

4. Taking it a step further, some shell config I have is host-specific (e.g., certain PATH modifications I only want to apply on certain hosts). Rather than use the host-specific dotfile feature of rcm for the whole .bashrc, I factor my shell config files into multiple files, that I then source. One of these files is called `$HOME/.util/host.sh`, which is host specific. Again, rcm creates a symlink from this to the correct host-specific file automatically by hostname.

If you're curious to learn more about any of this, my dotfiles are public.[2]

[0] https://github.com/thoughtbot/rcm

[1] https://docs.github.com/en/developers/overview/using-ssh-age...

[2] https://github.com/jez/dotfiles

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

#103
Wouldn't remote be the simplest solution?

Unfortunately, I can't find a perfect remote software, which should be able to automatically adapt to client resolutions, support multiple monitors, use hardware acceleration.

RDP is great, but it does not utilize the high bandwidth of modern network environment, so it's not as performant as it should be.

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

#104
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…

You can take it even further: stick to the defaults and mainly use command line tools.

Almost every linux box has bash, vim, and the GNU command line tools. If you can become proficient with default config cli tools, you can become proficient on almost any linux box.

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

#105
I have a dotfiles repo on GitHub, with Homebrew bundle to install almost everything and some additional shell script. For real dotfiles, I just migrated to rcm to manage that easier.

There are lots of dotfiles repos on GitHub. And you learn that quickly.

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

#106
post #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 lik…

Ha I do exactly this. Windows with Linux in a VM is great.

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

#108
post #42

I 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.…

I've been a sysadmin since I was 12, FreeBSD, Debian, Arch, Windows (sigh). I've been an SRE managing 1k+ mixed machines. I've done nomad, k8s, docker-compose, podman, ansible, powershell admin, firecracker, gitops...

I will never, ever, use anything that doesn't behave like NixOS again. It is a sea-change.

Is the language weird? Oh yes. Is the documentation scattered? Quite. It's all worth it.

If the love of your live spoke a different native language, you'd learn it.

Stick to defaults? Hell no. Own your computing life.

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

#109
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.…

> Use same to make dock auto-hide

Cmd-Opt-D to toggle auto-hiding – I use this one to check if the dock is frozen :)

(Also a great option to rebind: it's a global hotkey so no other app should be using it)

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

#110
post #96

Earlier quoted context omitted.

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!

If it was ESC instead you'd get a +1. ;)
Post reply on HN