Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’ve been using the same dotfiles git repo for 16 years across Linux, macOS, FreeBSD, OpenBSD. Config files all go in the same place on all those systems: a bunch of symlinks in ~ like ~/.ssh/config -> ~/.dotfiles/ssh/config, ~/.config -> ~/.dotfiles/config

The contents of dotfiles are all versioned controlled so “rollback” etc is all `git checkout …`.

That’s the same as home manager gives you right?

The difference between systems is how to obtain software, but it’s usually pretty similar across OSs, something like INSTALL_COMMAND[os] (PACKAGE_NAME[os][pkg] || package). Probably my setup is not as diva as yours but that difference seems quite small and easy to maintain to me in an install/$os.sh script and the problems between systems come up so infrequently for me that I’m fine not having declarative management.

The dotfiles cross-os scripts are all POSIX sh + git, both are available everywhere.

The only real annoyance I have is if macOS brew installed tmux v9001, but my OpenBSD system has only tmux v1.2, and the config is mutually incompatible. But in these cases would Nix help? The OpenBSD system would need a bunch of upgrades to install Nix, but then I can probably just install tmux 8009 or something directly.

The main advantage to “just git and posix sh” is that I can often use 80% of my dotfiles without root on arbitrary systems over ssh, since I don’t need any software to bootstrap the setup. If I used GNU stow or HomeManager I can’t easily have my setup on random EC2 jump boxes, university servers, borrowed netbooks, mobile phones, etc. I’m not using default configs but ideally I don’t need root to live a happy life.



I recently switched from using a basic git repo to home-manager.

You’re correct that the setup you describe gets you a lot of what Nix can provide. The main thing it is missing is Nix will also manage installing your software for you. I find managing both what my software is and how it is configured with a single tool to be very convenient.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: