nix: build re-arrangment
nix: split entry expression into lib.nix and pkgs.nix

tests work for Linux
NOVA conversion incomplete