Live data from Hacker News

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

news.ycombinator.com

41–50 of 153 posts

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

#41
I travel light.

I have multiple machines on multiple operating systems and dev on all of them. I sync nothing across them, instead I adjust to as many of the defaults of Sublime Text as possible and the only consistency is in how I organise the working directory on disk.

This isn't what you asked, but I'm not sure one has to sync them all.

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

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

If you haven't yet, I'd recommend giving Nix/NixOS a try. There's a bit of a learning curve but it's very powerful.

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

#43
post #27

You could use a dotfiles manager like https://yadm.io/ It's more or less a wrapper of git, but it comes with a bunch of features that allow you to do the things you describe.

This is what I have set up. Admittedly I keep forgetting to use it.

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

#44
post #36

Like a few others here, I use git with a .dotfiles directory, which uses an install script that creates symblinks (among other things). It's grown a lot of over the years (maybe decade now?) and I've been meaning to look into using something like GNU Stow, but haven't got around to it. The install script and configuration works on macOS and Linux, but sometimes requires updating when running on a new machine (like re…

I'd never heard of the Include behaviour for gitconfig files. That's really nice, thank you for sharing that!

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

#46
I use salt for configuration management of the machine itself (system-wide settings, packages), a dotfiles git repo for desktop configuration files with submodules for certain things (like package managers for vim and zsh).

For development environments, JetBrains IDEs have their own cloud config sync thing and I try to stick to defaults as much as possible (and rely on the language environment's tooling for linting/formatting/etc rather than the one in the IDE).

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

#47
I use chezmoi (http://chezmoi.io) after years of rolling my own. It’s not as straightforward as some home managers, but the extra power it provides is _amazing_ and worth the learning curve.

I pull some information from the local keychain and others from 1Password (with `op`; I will be moving most of the rest to 1Password from the keychain). It can run additional scripts _after_ each update (I use it to update my fish plug-in installations if I change `fish_plugins`).

It has integrations with many different password managers so that it is possible truly keep your secrets out of your dotfile configuration and _still_ vary the configuration based on those secrets.

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

#48
EDIT: Chezmoi will do all this. https://www.chezmoi.io/quick-start/

Somewhat related question:

Can GNU stow do this, and if not, can anyone recommend a package/app to do it? I want to have a config file with a list of source files and where I want them symlinked. Then have a tool that maintains those links. Example:

    # SOURCE                               # DESTINATION
    zsh/zshenv                             ~/.zshenv
    zsh/zshrc                              ~/.zshrc
    gitconfig                              ~/.gitconfig
From my reading of GNU stow, it operates on full directories and relies on having the files already named correctly.

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

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

Yes, this is one of the best decision I made quite a while back. I'm usually asked for ideas and advices on how to setup computers, both technical and non-technical friends and families. I have always suggested putting a little more effort in learning the defaults and getting used to it.

I have even written a short essay, as I found myself repeating the same suggestions many a times. https://notes.oinam.com/digital/apple/

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

#50

I use chezmoi ( http://chezmoi.io ) after years of rolling my own. It’s not as straightforward as some home managers, but the extra power it provides is _amazing_ and worth the learning curve. I pull some information from the local keychain and others from 1Password (with `op`; I will be moving most of the rest to 1Password from the keychain). It can run additional scripts _after_ each update (I use it to update my f…

Chezmoi looks to be exactly what I want, HUGE thank you for sharing that!
Post reply on HN