[Nix-dev] how does NixOS ensure focus?

hasufell hasufell at gentoo.org
Mon Jul 28 16:08:38 CEST 2014


Ertugrul Söylemez:
> Hi there hasufell,
> 
> NixOS works quite differently.
> 
> Let me explain the technical part first.
> 
> Whenever you install NixOS, you're really forking it, and your
> installation becomes your own distribution.  You can then choose to
> merge some or all changes in the official NixOS channel into yours
> (you might call this "upgrading").  That also works the other way
> around.  Contributing to NixOS really means that you make a change to
> your own distribution and send a patch or pull-request.  So unlike other
> distributions we do not actually have "contributors" or "maintainers"
> in the traditional sense.  As far as I can tell, this model is unique.
> 

We have a similar concept in gentoo where you can "overwrite" ebuilds
(package definitions) by adding 3rd party repositories called overlays.
So you can in fact mix gentoo with funtoo with sabayoon with pentoo, set
priorities of those overlays and even force package foo from a specific
overlay.
However, this usually gives a lot of complicated problems where packages
rely on certain behavior or even patches of other packages. Maybe NixOS
doesn't have these problems due to it's technical concept, but I find it
hard to tell at this stage.

In addition, most user overlays have very poor quality (pretty much what
arch linux has with AUR) and regularly break non-trivial libraries like
SDL for example.

I see that as a big problem of decentralized packaging: quality
assurance and consistency (consistency in a very low-level sense, as in:
packages work with each other). From my experience it doesn't work to
randomly review other peoples work and encourage them to more QA etc.
There has to be a very strong attraction for people to have their work
merged at some point.


> The concept extends from packaging to application development,
> deployment and host management.  When you want to deploy a service, you
> write a NixOS module.  This is still in your own fork.  When the module
> is useful to others, you send a patch or PR, and everybody else
> benefits from it.  In any case you do not depend on anyone in the NixOS
> community, you do not have to gain any sort of status before you can
> get to work.  And if your changes are not merged, you don't lose
> anything.  I made my first contribution within about a week of
> installing NixOS for the first time.  I made the change and sent a PR.
> 
> Now to the community structure:
> 
> There are official committers to the Nixpkgs repository.  We do not
> have something like an election process.  We have forks, and people
> just implement ideas.  When others agree with them, they can help with
> development.  It's just a fork after all.  Then the official committers
> can choose to merge the changes, if they agree with them.  If they
> don't, the project isn't doomed, but can simply continue as a separate
> fork, and smaller changes can still be exchanged.  I don't think this
> happened in practice yet, but when it does, nothing bad happens.
> 
> In particular if you want to make a distribution based on NixOS,
> neither do you have to start from scratch, nor do you have to give up
> the upstream Nixpkgs.  You would just maintain a Nixpkgs fork with your
> own customisations.  NixOS users can even merge your customisations
> without "switching to your distribution" or giving up Nixpkgs.  And
> when they're unhappy, they can remove your changes again.
> 
> In conclusion, our development methodology is very different, so a
> comparison to Gentoo is difficult or even unfair.  My personal opinion
> is that this is a great model.  It gives me freedom and independence and
> makes it easy for me to contribute and influence the direction NixOS is
> taking -- not by talking, but by doing stuff.  The decentralised nature
> of our development process allows a small community like ours to be
> very productive.  Forks and branches are not seen as fragmentation, but
> rather as addons everybody can use.
> 
> In fact to be honest, after well over 13 years of Linux usage, I never
> contributed to other distributions, simply because I couldn't be
> bothered to gain any kind of social status before I'm allowed to do
> so.  Expanding on your story, when I have an idea that I consider
> great, I just want to do it.  I don't want others to get in my way.  No
> elections, no discussions.  It's my idea and I want to figure out in a
> practical setting whether it works.  And when it does, I want a short
> and easy path from my implementation to the official repository.  NixOS
> makes this possible.
> 
> After half a century we have mostly figured out how to develop software
> productively, using decentralised methods, forks, branches, merges,
> etc.  Compared to this almost all distributions still use stone-age
> methodologies.  NixOS is a step into the right direction, not only
> regarding packaging, development and deployment, but also community
> structure.
> 

This sounds great, in a way. However, worst case scenario is that there
are so many forks and people working on so different ideas that none of
these can compete with up2date distributions and that getting a
consistent experience involves a lot of research, manual fiddling and
following unofficial tutorials and hacks.

I don't want to paint things too black, I'm just saying that it really
depends on details and what actually happens, probably even a culture thing.

But I guess I'd have to get involved in order to actually know.


More information about the nix-dev mailing list