Hacker News new | ask | show | jobs
by lillecarl 1890 days ago
Both docker and flatpak are quite new in comparision to APT. Nix isn't really new, but gained traction lately, so in comparision to APT i would say It too is "new". We're not there yet, but i i believe shipping your dependencies with your application is how it'll all pan out for a lot of things. Even if it's a security nightmare not being able to update the dependencies for the entire system.

EDIT: And being new, there facilities aren't as mature, userbase smaller, so not enough work is put into packaging the latest versions. Since they also take on the goal of sandboxing the barrier for entry might be higher.

1 comments

In general, Nixpkgs is very up to date. I'm a little surprised that the latest point release of Docker isn't in the master branch already. Maybe that's because emphasis is elsewhere for the upcoming NixOS 21.05 release at the moment.

But I think the main barrier to running Docker from Nix on non-NixOS is the lack of a systemd unit file or other init system configuration in Nixpkgs. Nixpkgs just doesn't have any facilities for that atm and afaict no one is working on them right now. There are definitely precursors to that functionality in:

• the NixOS module system, which provides exactly this functionality for NixOS, where the module system is in charge of configuring systemd

• home-manager, a module system like NixOS which adds support for systemd user services on non-NixOS: https://github.com/nix-community/home-manager

• nix-processmgmt, an experimental Nix framework for writing Nix expressions to describe services to be managed by a range of process managers that may or may not be PID 1 (which means the could be usable on non-NixOS): https://github.com/svanderburg/nix-processmgmt

• nix-darwin, a module system for macOS that provides some NixOS functionality, including managing services: https://github.com/LnL7/nix-darwin

The discussion on the service abstraction layer for Nixpkgs/NixOS is also very relevant. It shows that there has been interest in something like this for many years, but it's never quite come together: https://github.com/NixOS/nixpkgs/issues/26067

I wouldn't assume it's just around the corner or inevitable. It is a really exciting possibility, though, and the nix-processmgmt framework seems like something that could evolve into a service abstraction layer for Nixpkgs that could make facilities for managing services available in a uniform way even on non-NixOS Linux.