Live data from Hacker News

Ask HN: How do you share your personal setup over different computers?

news.ycombinator.com

31–40 of 42 posts

Re: Ask HN: How do you share your personal setup over different computers?

#31

Nix Getting a new machine requires a git pull, running nix rebuild / nix darwin rebuild and my machine is set up “exactly” the same as the other machine. Exact configuration, exact versions of software, completely deterministic. No running custom GNU stow scripts that I used to do. No fragile non deterministic Ansible playbooks that randomly fail. The caveat, Nix requires a time/investment from a user to learn (searc…

I do the same, it is fantastic. I have my work laptop, personal laptop and desktop using a nearly identical configuration (a tiny bit of extra software for work) and it is really a breeze. It felt amazing to install the new work laptop in well under and hour and having everything just work. No more slowly realizing that X hasn't been set up and Y hasn't been installed for the next month or two.

I documented my steps to install a new machine publicly if anyone is interested. It isn't fully automated but a fairly small number of steps to get everything set up. https://kevincox.ca/2021/05/06/workstation-install-with-nixo...

Re: Ask HN: How do you share your personal setup over different computers?

#32
post #19

NixOS. Push to a git repo, pull it, rebuild, done. I store anything other than random downloads on my NAS so there's literally 0 difference from one machine to another.

I want to believe. Are there any good "quickstart" style HOWTOs for NixOS for people who don't want to necessarily engage in a deep dive on NixOS?

The quickest, most practical taste for Nix would be: https://nix.dev/

I'd start with trying to use Nix before going with NixOS or home-manager.

Re: Ask HN: How do you share your personal setup over different computers?

#34

As others have said, on Ubuntu/Linux, ansible. On windows, I'm still working on it, but chocolatey provides a decent starter for getting dev tools I need installed, just gotta figure out a way to save and restore configs.

winget can do that tool

hmm, Can't see any way to browse what winget offers... and there's mentions of needing a MS account from skimming the MS docs?

I'll stick to chocolatey, if you've a neat & tidy solution for gathering the configs up, I'd be happy to hear about it.

Re: Ask HN: How do you share your personal setup over different computers?

#35
post #25

Earlier quoted context omitted.

winget can do that tool

`winget export -o ` and `winget import ` will let you move a list of all the software installed on your machine to a new one (assuming it's available in the repo). There's still a few bugs but it'll get most of the usual suspects.

From the looks of it, a lot of things are missing from that export....

    - Half a dozen of the VC C++ redists (although another half a dozen did make it in).
    - Firefox
    - MS Office? Somehow?
    - WSL also gets listed (Windows Subsystem for Linux Update)?

Re: Ask HN: How do you share your personal setup over different computers?

#36

Nix Getting a new machine requires a git pull, running nix rebuild / nix darwin rebuild and my machine is set up “exactly” the same as the other machine. Exact configuration, exact versions of software, completely deterministic. No running custom GNU stow scripts that I used to do. No fragile non deterministic Ansible playbooks that randomly fail. The caveat, Nix requires a time/investment from a user to learn (searc…

I had read about Nix before, but had totally forgotten about it! I'm gonna give it a try. Thanks!

Re: Ask HN: How do you share your personal setup over different computers?

#37
I have always (except once when I worked at a web hosting company with Debian desktops for a short while) had a work-mandated Windows workstation, but my computing life is very *nix centric, so I always install VirtualBox + Vagrant and build a VM to get work done in. I rebuild it once a week to motivate me to do changes via the config.

Also, I keep my .emacs in a publicly accessible S3 bucket. The .emacs on each machine is just a stub to pull it down and evaluate it on startup.

Re: Ask HN: How do you share your personal setup over different computers?

#38

I use a `.dotfiles` github repository with a `setup` or `setup.cmd`, depending if its windows or *nix and which host. Additionally, I keep my config files in `.dotfiles/etc` and the setup scripts softlink the files to the right locations in $HOME. Examples: - .dotfiles/etc/git/.gitconfig - .dotfiles/windows/setup.cmd - .dotfiles/linux/setup_ubuntu - .dotfiles/macos/setup The setup script depends on the OS, using `sco…

I used to have this same setup, but recently I switched to a bare git repo following the advice of this article: https://www.atlassian.com/git/tutorials/dotfiles I think this is much better and you might consider it

Mmh, I have to read this carefully, but after the first read it seems to be way more complex than my current solution...

Thanks anyway, maybe there is room for improvement.

Re: Ask HN: How do you share your personal setup over different computers?

#39

Earlier quoted context omitted.

I used to have this same setup, but recently I switched to a bare git repo following the advice of this article: https://www.atlassian.com/git/tutorials/dotfiles I think this is much better and you might consider it

I think the 'yadm' project is basically this but slightly more polished. https://yadm.io/docs/getting_started#

Yeah, there are many of these out there... also GNU stow (see https://alexpearce.me/2016/02/managing-dotfiles-with-stow/)

But I did not feel enough pain to switch to an extra utility yet. For now, `git` and `sh` are just enough...

Post reply on HN