Live data from Hacker News

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

news.ycombinator.com

71–80 of 153 posts

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

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

It's crazy how good nixos+git gets when you've iterated for a while. I'm using the same setup on my work laptop, my home PC, and my router. 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…

One of the things I love the most about it is that we can use CI to update flake inputs and build configs on a cadence, which is almost like having dependabot for machine configuration.

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

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

Yup. I run one laptop and four servers on Nix. It is the only sane option I have come across so far(I used bare git repos with Arch before).

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

#74
I use git to sync a local bin folder between machines. One branch per type environment though sometimes that's just a branch for a particular machine.

common files between many environments are just in a common subdirectory. This could be a submodule, but that's overkill, I just sync it via a git path checkout from time to time.

Dotfiles are in there too and symlinked to wherever they're used. Similar with other configs. If they're picky about being symlinked, I'll write a quick copy script to pull them into a subfolder to bring it into git.

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

#75
I really like homeshick, it's very simple and stays out of my way, but also makes it trivial to keep track of aliases and config that I like to have around.

I don't do a ton of configuration these days, I mostly just set up VSCode, fzf and my .vimrc and feel pretty happy. But whenever I do want to make a change, I know it's worth the effort, since it can be easily synced to any of my machines.

I do have a setup where my bashrc and zshrc just source a common aliases / functions file, which makes most of my config work across both shells. If I'm doing something tricky then I'll usually take the time to implement it for both shells.

I also have a file called `.system-specific-profile` which is sourced by my common profile, but is not synced - this is where I dump one-off stuff that doesn't need to be synced.

All in all it's fairly minimal but flexible enough for basically anything I've ever needed to do.

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

#77

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…

Another happy chezmoi user here. The templates are hugely convenient.

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

#80

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…

[deleted]
Post reply on HN