Live data from Hacker News

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

news.ycombinator.com

51–60 of 153 posts

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

#51
A nice way to do that with git:

https://news.opensuse.org/2020/03/27/Manage-dotfiles-with-Gi...

> then tediously spend a day or more re-configuring newly installed computers with the software and configurations I know I'm using

Config is just dotfiles pull and software is either a bash script, dpkg --set-selections or ansible (a bit overkill).

Another option is dropbox and lots of symlinks.

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

#53
I keep my Dev environments in dockerfiles. It's a bit annoying as docker isn't designed for this so I had to figure out how to punch holes in its security for things like access to USB, running graphical apps, etc. I tried to watch to podman but ironically didn't get that to work because it is too secure.

The advantage of all this is that they are separate so you don't need to worry about some embedded IDE or python crap barfing all over your system. I check all the dockerfiles and config files that they install into git. I've been watching nix but it's seems like it's a bit of a Marmite project so I might wait to see if something better turns up.

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

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

Also, if something takes more than 5 minutes to learn or set up I will usually at least look for other options, on the assumption that if it takes time to set up, it will probably take time to maintain and modify, because it was probably made by people who enjoy deep customization.

There's lots of things worth learning and setting up, but also lots that... I'm not so sure about.

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

#56
I use primarily linux but these are the tools i use:

Ansible - I can bootstrap a new linux install with all of my configs in ~10min, this has saved me countless hours of time. My linux installs are heavily modified (tiling window manager, lots of custom hotkeys, custom ricing)

Git - I sync all of my dotfiles to git and and can keep them in sync between PCs.

Syncthing - My dev folder and a few other important folders are kept in sync between all of my PCs using syncthing. I can save a file on my desktop and turn to my laptop and the file will almost instantly be there.

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

#57

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) within 2 minutes.

[0] https://github.com/peteryates/dotfiles/

[1] https://github.com/peteryates/dotfiles/blob/master/Makefile#...

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

#58

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…

I have a 'personal' directory in my dotfiles repo, and within it are my .zshrc and other files. Then it's just:

    stow -v --defer='.+' personal
and they're all put in place. The defer argument simply prevents any overwriting.

    ~/dotfiles % ls -a personal/
    .bash_aliases  .bashrc        .gitconfig
    [...]
EDIT: Yeah, it won't rename files when stowing them. It's never been an issue for me, FWIW.

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

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

Agreed, same thing with basic stuff like color schemes. I just pick one that's auto installed by default with an IDE and stick with it. I'm tired of futzing and installing stuff to get things juuuuust right. Most IDEs come with great defaults.

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

#60
I just have a bare metal server I rent from OVH and run everything there and just remote into it with VS codes pretty great remote feature. Works great unless I'm traveling. If I'm going to be on the road I'll just setup what I need locally just in case.
Post reply on HN