Hacker News new | ask | show | jobs
by ratorx 1184 days ago
I used NixOS for a while, but switched back to Debian. My pain point was that unless you also use Docker etc, deploying applications and deploying the system is inseparable. I don’t want to rebuild my system to update an app. This is especially painful on e.g. Raspberry Pi, because full deployments are expensive and you end up needing to set up VMs for building etc. The killer feature for me would be separable roots, so I could use multiple instances of NixOS on 1 system.

The other aspect is that declarative is nice, but often you care about preserving data as well. So you need backups etc. If you have full system backups, then separating config from data is more complex (and less useful). I’d rather spend my time on a rock solid and frequent backup strategy than worry about NixOS + a solid backup strategy.

I only have 1 server though. If I had more, then being declarative might be more useful. I currently use Nix for project dependencies, which is really nice.

1 comments

> don’t want to rebuild my system to update an app.

You don't have to do that - there's lots of other options. (Although the system shouldn't rebuild if you don't update your channels, so the premise is interesting/suspicious.)

You can build your app independently against a pinned nixpkgs version. You can build the app and export/import that closure on another system. You can build the app itself using nix-build without engaging the nixos switch.

Building the app is not the problem, Nix adds minimal overhead for that. Deploying the app is annoying because changing a systemd service requires a nixos-rebuild, which is pretty slow on a Raspberry Pi.

There’s no good way to have an auto-updating non-NixOS systemd service on NixOS, because it’s not designed to co-exist with other things.

Also, NixOS is pretty much a DSL around systemd for this kind of thing. Systemd is already fairly declarative, so the indirection seems a bit unnecessary.