|
|
|
|
|
by from-nibly
540 days ago
|
|
I use home manager for my personal setup. It's just files in a git repo. At my latest job I had to switch from linux to macos. Even with having never been confronted with macos the config barely needed any changes. I was able to get a HIGHLY customized setup working almost identically to my linux setup in less than a day. If you are someone that says "I just use defaults so I don't waste time getting things set up" good for you. I'm a diva and I have a really custom setup with aliases and scripts I've developed over 10+ years and it would take me weeks to get it all back if I was starting from scratch. I've tried using ansible and custom bash scripts. Nothing comes close to how effective home manager / nix is at maintaining my diva setup. You are not wrong though about making your own package being a pain. If nix doesn't have a package (which almost never happens) I just give up and install it with some other package manager manually. I don't have time for that. I used to use nixos but not having an escape hatch was too much. |
|
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.