System configuration & Package updates on NVIDIA Jetson TK1 , NixOS on Arm

I guess many people here are interested on having a faster running OS on your Tegra K1 which can be used to optimize the performance of your specific software or service. And if you are running a bigger scale project with multiple Tegra K1 SoCs deployed to customers, maybe you are also interested on a mechanism that can deliver atomic system upgrades (shouldn’t break the running system after an upgrade) and package updates to your TK1 arm boards Over.The.Air like how Android deliver updates to smartphones.

While researching on these aspects, I came across NixOS as an alternative linux distro that can be ported to Jetson TK1. There is already a simple guide to port NixOS on Armv here https://nixos.org/wiki/NixOS_on_ARM which successfully boots into TK1.

NixOS is a very useful, unique barebone OS which delivers atomic system and software upgrades and rollbacks. It can be highly optimized to have a faster, responsive OS running on TK1 and most importantly a system that will not break down while or after you deliver an update. NixOS could be a better alternative to ubuntu L4T that comes with the board or ArchLinux or Gentoo if configured properly.

https://nixos.org/nix/

NixOS uses the universal package manager called Nix (which also can be installed in other linux distros) to manage all software and services installed on the system including the Linux kernel. It’s a purely functional linux distribution meaning it uses its own declarative, modular language to configure the system and build packages (even kernel is treated as a package inside /nix/store/).

The problem is that configuring the system and drivers and building the packages requires some hardwork at the beginning which possibly will make life easier once the TK1 based systems are deployed and you need to update your system and packages over the air like in Android.

NixOS doesn’t use a conventional rootfs like /usr/share /usr/local and you cannot use deb based packaging like apt-get to install a package. Nix does all these using its own declarative purely functional language which uses nix expressions to build packages and configure the system. It also treats the kernel itself as a package that can be modified using nix expressions. Nix package manager allows to build packages from source and also with prebuilt binaries.
services

I would appreciate all your inputs on NixOS, specially related to compiling Kernel, driver configuration and building packages. I hope this thread could also provide a better alternative to some key areas in many of your projects using Tegra K1. Thank you!