[Nix-dev] Porting NixOS

Marc Weber marco-oweber at gmx.de
Wed Oct 15 04:00:16 CEST 2008


On Tue, Oct 14, 2008 at 09:15:20PM -0400, Daniel Clark wrote:
> I'm in the process of seeing how hard it would be to port NixOS to
> non-intel architectures / boot loaders other than grub. 
Hmm. Just don't think about nixos as os. Only a very small part is
related to grub, so to say only the part which generates the menu
entries and installs the grub boot loader. You don't need both.
I've a local patch which makes nixos run in user mode linux flawlessly
without grub (you can't switch back to prior configurations that easily
before booting then which I didn't mind in my use case).
If you've learned about nix you also know how nixos works.
bASICally its task is to provide a set of derivations needed to manage
the system eg
* boot manager setup ( installing grub and menu.lst which contains a 
  link to stage-1)
* boot scripts
  stage-1 (it's task is to mount the filesystem containing the nix store
        so that everything else can be started, in particlar stage-2
  stage-2 (mainly starts upstart)
* activate-configuration [2] script
* start upstart (done end of stage-2)
* provide upstart scripts (mounting the not yet mounted partitions,
  starting apache etc etc)
* provide a script to update source for convinience and rebuild the
  system (nixos-rebuild), which builds [2] and finally runs it depending
  on passed arguments.
Of course you can just replace any of the previous steps by a custom
one.

Of course if you want to "port" NixOS to another architecture you have
to make sure that at least gcc, autotools and sh do work there, because
otherwise you'd have to rewrite almost everything from scratch..

Anyway if you start let me know than I'll tidy up my patch and commit
it.

> 
> I'd also like to know if there is any interest amongst the NixOS
> developers to make NixOS a distribution that would be compliant with
> the FSF/GNU Project's Guidelines for Free System Distributions [1] and
I've never heard about it before.

quote : " Nonfree Firmware

        Some applications and drivers require firmware to function, and
        sometimes that firmware is distributed only in object code form, under a
        nonfree license. We call these firmware programs "blobs." On most
        GNU/Linux systems, you'll typically find these accompanying some drivers

        in the kernel Linux. Such firmware should be removed from a free system
        distribution. "
*ouch*.. Then my wireless card would no longer work.
But you are right that it would be easy to mark derivations (packages)
as unfree and block them if you want a free version.. However I'm not
sure I'd like to spend much time on that. Anyway I'm only a
contributor here.

Thanks for your input, let me know if I can help you setup a different
boot process.

Marc Weber



More information about the nix-dev mailing list