Ask HN: How do you share your personal setup over different computers?
11–20 of 42 posts
Re: Ask HN: How do you share your personal setup over different computers?
#12Re: Ask HN: How do you share your personal setup over different computers?
#13For command line, all the tools I use have the equivalent of “source other/file” in their config language so all my dotfiles begin with a source line that sets up my sensible defaults, and then local changes come afterwards. For example:
# ~/.bashrc
source ~/.config/dotfiles/bashrc
# Local stuff
GITLAB_TOKEN=…
.config/dotfiles is a git repo. I have very few local overrides, there’s no install step needed other than a git pull, and no mucky symlinks. The initial setup is a script on my website that I curl-pipe-to-bash on new hosts.For my dev environment I have a script that builds a dockerfile that makes an ubuntu:jammy and installs 30 Debian packages, 10 Python packages, and two locales that apparently I can’t live without. When you run it, it bind mounts $HOME into the container and then cd’s to the directory I started in. With one command I can go from ~/projects/foo on my machine to ~/projects/foo in the container with all my favourite tools.
You can bind mount SSH_AUTH_SOCK and your X11 Unix socket too to run a bleeding edge copy of Xeyes. Docker on macOS M1 means the same environment in macOS as on my dev servers and desktops.
Re: Ask HN: How do you share your personal setup over different computers?
#14Re: Ask HN: How do you share your personal setup over different computers?
#15On 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.
Re: Ask HN: How do you share your personal setup over different computers?
#16 - .dotfiles/etc/git/.gitconfig
- .dotfiles/windows/setup.cmd
- .dotfiles/linux/setup_ubuntu
- .dotfiles/macos/setup
The setup script depends on the OS, using `scoop` for windows (https://pilabor.com/blog/2021/12/automate-windows-app-setup-...), `apt` / `dnf` / `pacman` for linux and `brew` for macOS.Re: Ask HN: How do you share your personal setup over different computers?
#17As 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.
Re: Ask HN: How do you share your personal setup over different computers?
#18I store anything other than random downloads on my NAS so there's literally 0 difference from one machine to another.
Re: Ask HN: How do you share your personal setup over different computers?
#19NixOS. 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.
Are there any good "quickstart" style HOWTOs for NixOS for people who don't want to necessarily engage in a deep dive on NixOS?