Live data from Hacker News

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

news.ycombinator.com

141–150 of 153 posts

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

#142
post #89
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.…

Nix learning curve wouldn't be bad if the documentation wasn't so bad. I have had to put together my configuration based on couple of blogposts from randoms.

Documentation (and cli assuming you use nix-command) today is bounds better than in the past. A huge shoutout to Jon Ringer who always seems to pop up making a positive impact whenever I google something nix-related.

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

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

Just as a sidenote, because I was using Spectacle as well. JFYI: As it is no longer maintained, I switched to Rectangle (https://github.com/rxhanson/Rectangle) and can highly recommend it.

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

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

Just as a sidenote, because I was using Spectacle as well. JFYI: As it is no longer maintained, I switched to Rectangle ( https://github.com/rxhanson/Rectangle ) and can highly recommend it.

Yeah, I'm just putting off switching because Spectacle still works, and has never broken or even behaved in a way that seemed weird or less than ideal, even across multiple monitors, with changing screen situations (hiding/un-hiding the dock), et c. It is one of the very few pieces of software I run that has given me precisely zero problems of any kind. Ain't broke, don't fix it, and all that.

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

#145
post #136

Earlier quoted context omitted.

Why not Command instead of Ctrl? Isn't that something that you use way more often?

I'm not that commenter but ctrl is my least favourite regularly used key to hit. It's not comfortable to reach with either my pinky or thumb. Command is basically where my thumb rests naturally, it's in prime position.

Yep, cmd is great where it is. If I compare cmd-shortcuts with identical ctrl-shortcuts, with normal key mapping, the ctrl ones strain my hand and pull my fingers away from the home row. The same cmd-based shortcuts do neither of those things. It's one thing Apple got very right, that everyone else is getting wrong.

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

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

It slows my shell start-up a few hundred milliseconds, but I keep a nag in my bashrc to list changed files.

    yadm_diff=$(yadm --no-pager diff --name-only --exit-code)
    if [ $? -ne 0 ]; then
        echo -e "\e[1m\e[91m[yadm] \e[0m\e[92mThese config files have been modified:\e[39m"
        echo "$yadm_diff"
    fi

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

#148
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 stick with the defaults as much as possible. Instead of changing the configuration of the computer, I change myself.

This is the worst advice you could give. There are plenty of shitty defaults and default tastes vary from app to app and there's a reason things are customizable.

Customize to your taste throughout your tools and don't let a new tool eat your time.

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

#149

That's one reason I have close to zero interest in Vim(Or window managers, or anything of the sort). I can rebuild my configuration(Aside from some fussy embedded toolchains) in half an hour or so. VS code, a few different linters, swissknife, stack tabs, timestamper, indenticator, pylance.... done. Even if there's a Windows machine I'm fine. Haven't done anything on mac in a decade but I assume I'd be fine there too…

> I can rebuild my configuration(Aside from some fussy embedded toolchains) in half an hour or so. VS code, a few different linters, swissknife, stack tabs, timestamper, indenticator, pylance.... done. I can clone my dotfiles repo[0], run a single command that installs all my dependencies[1], another that links my config and I'm done. That gives me a fully-configured neovim with all my plugins (thanks vim-plug) withi…

Pretty impressive, but also looks like a big initial time investment.

Also, will it all work on Windows? Looks like I'd need a whole new setup to get things running on a windows machine if for some reason that's what was available at work.

Do things break between Linux releases? The number of extra steps you need to get something like language server protocol working makes it seem like at least some maintenance could be needed.

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

#150

This might be the worst answer but.... I dont! I love setting up each new machine fresh, because I feel like during the development cycle I incur a lot of software/CLI tooling debt that I don't need anymore.

You still need to have the reference point saved somewhere right? I am not sure if starting from scratch every time is the right way.
Post reply on HN