The author says the learning curve is steep but it pays off at the end. Somehow I don't really see that claim well supported.
Don't get me wrong, I absolutely love the idea of managing my system declarative (aconfmgr gets me somewhat there). I replicate my system on an external SSD for on the go for example.
I hate a messy home but resigned myself to it. I come from a functional background, so the learning curve should be less steep for me.
But overall it always seems the amount of work and time for the result is not a reasonable tradeoff. Tried Nix as a package manager a few times, always stopped when simple things took immense amount of time (Emacs with broken fonts?). Have colleagues running NixOS, never heard an argument for it that wasn't half a straw man. Yeah other systems break and it sucks but fixing that takes less time than figuring out how to write your own packages in Nix.
Adding to that that I run around and install every second neat thing I see on HN, I struggle to see Nix as more than a Rubik's cube.
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.
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.
I think a lot of the nix people are overly puritan when it comes to using Nix. Everything must be reproducible, etc. I have found my perfect sweetspot by abandoning NixOS and instead using home-manager + PopOS. That way, if something doesn't work on Nix, I'll just look up the ubuntu guide, BUT i still get by far most of the reproducibility of Nix and the massive package set.
Agreed. I've been using NixOS on several machines for a few years now, and it has never "clicked" for me either. It's not that the learning curve is steep; it's that the ecosystem is actively hostile to the user, with confusing failures and error messages, poor/missing/outdated documentation, alien syntax and concepts unique to Nix, etc. Maybe all of this makes perfect sense to the creators of the project, and to hardcore users that dedicate a lot of time to it, but, frankly, I don't have that kind of patience.
So recently I decided to give up on it and look into Guix instead more seriously. I played around with it a bit when the project was young, but it was barely usable back then. I'm hoping that it has matured enough to be usable for everyday computing, since it's now relatively simple to install non-GNU-approved packages. It borrows many concepts from Nix (including home management), and Guile at least seems like a sensible language with solid fundamentals.
I do think that the concepts Nix pioneered will eventually trickle down to mainstream distros and other operating systems. They're too powerful to ignore. But Nix itself will not be the tool that drives this adoption.
How home manager users handle the case of setting up the home directory on a system they have no control over, and therefore nix is not usually available?
I’ve been test driving nixos for a couple of months now. It’s not without merit but I’m going back to the Silverblue approach. It’s just less friction overall without giving any benefits up.
I've concluded that a selective backup of the homedir is a better strategy than having dotfiles under version control and such. Keeping track of every little file is just too taxing. The movie collection belongs in the ignore file though.
The author says the learning curve is steep but it pays off at the end. Somehow I don't really see that claim well supported. Don't get me wrong, I absolutely love the idea of managing my system declarative (aconfmgr gets me somewhat there). I replicate my system on an external SSD for on the go for example. I hate a messy home but resigned myself to it. I come from a functional background, so the learning curve should be less steep for me.
But overall it always seems the amount of work and time for the result is not a reasonable tradeoff. Tried Nix as a package manager a few times, always stopped when simple things took immense amount of time (Emacs with broken fonts?). Have colleagues running NixOS, never heard an argument for it that wasn't half a straw man. Yeah other systems break and it sucks but fixing that takes less time than figuring out how to write your own packages in Nix. Adding to that that I run around and install every second neat thing I see on HN, I struggle to see Nix as more than a Rubik's cube.
What am I missing?
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.
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.
I think a lot of the nix people are overly puritan when it comes to using Nix. Everything must be reproducible, etc. I have found my perfect sweetspot by abandoning NixOS and instead using home-manager + PopOS. That way, if something doesn't work on Nix, I'll just look up the ubuntu guide, BUT i still get by far most of the reproducibility of Nix and the massive package set.
I wrote a longer blog post about it some time ago, if you're interested: https://rasmuskirk.com/articles/2024-07-24_dont-use-nixos/
Agreed. I've been using NixOS on several machines for a few years now, and it has never "clicked" for me either. It's not that the learning curve is steep; it's that the ecosystem is actively hostile to the user, with confusing failures and error messages, poor/missing/outdated documentation, alien syntax and concepts unique to Nix, etc. Maybe all of this makes perfect sense to the creators of the project, and to hardcore users that dedicate a lot of time to it, but, frankly, I don't have that kind of patience.
So recently I decided to give up on it and look into Guix instead more seriously. I played around with it a bit when the project was young, but it was barely usable back then. I'm hoping that it has matured enough to be usable for everyday computing, since it's now relatively simple to install non-GNU-approved packages. It borrows many concepts from Nix (including home management), and Guile at least seems like a sensible language with solid fundamentals.
I do think that the concepts Nix pioneered will eventually trickle down to mainstream distros and other operating systems. They're too powerful to ignore. But Nix itself will not be the tool that drives this adoption.
How home manager users handle the case of setting up the home directory on a system they have no control over, and therefore nix is not usually available?
I’ve been test driving nixos for a couple of months now. It’s not without merit but I’m going back to the Silverblue approach. It’s just less friction overall without giving any benefits up.
I've concluded that a selective backup of the homedir is a better strategy than having dotfiles under version control and such. Keeping track of every little file is just too taxing. The movie collection belongs in the ignore file though.
I've found gnu stow to be fine for 99% of people and much easier to manage
How to choose the base operating system for `home-manager`? I've suffering a LD error on Ubuntu.
It should have the same constraints as nix itself — i.e. easiest on linux, slightly more complicated on macos.
Bug isolation is probably the best next step for you. Is it during nix installation? Is it a particular package that thows an error?
There's some community at #hm:rycee.net, perhaps they can help you debug it live.