Live data from Hacker News

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

news.ycombinator.com

21–30 of 153 posts

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

#21
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'm doing the same. In some companies you can't just get ssh to outside world, or download some stuff from github... So I stick to defaults and I try to do development on single machine.

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

#23
- Dotfile repo hoested on GitHub

- `git clone` said repository to my machines

- `ln` from repository folder to `~/` (can be done in an install script or piecemeal)

- `git pull` to update

I also purposely try and use as many default configurations as possible. I use a lot of remote machines that do not have my configs on them, so I do not want to become too reliant on custom setups.

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

#24
post #16

I've been using Ansible for years now to do this. Right now all my computers run fedora so there's not much difference between them but for some time I used Ansible on macOS too. It worked but was a pain to make my roles compatible for both linux and macOS. In my experience Ansible is good when dealing with text files or if there's already a module for what you're trying to do (for example managing postgresql users).…

I’ve used a git repo with ansible on ubuntu, win10, WSL2 and macos. Works close-enough-ish and I mainly use it to copy dotfiles into place. I’ve used symlinks in the past to avoid reliance on a tool, but symlinks are no good on windows.

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

#25
Dotfiles in my home directory go in a repo that gets cloned and "installed" (I use a shell script that I wrote to make all the symlinks, but GNU Stow is probably better better). System level configuration and package installation is handled by ansible, with a certain amount of stuff controlled by conditional statements based on the distro and host name of the machine to allow arbitrarily local overrides.

All that said, if I was starting today I would strongly consider just putting everything into nix with home manager and carry that config around in a git repo that installed my packages and their configuration and encapsulated my entire environment.

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

#28

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

Post reply on HN