Bit of a cleanup to make it more readable and also fix building of libraries. Moving the actual build to `default.nix` makes `flake.nix` more readable. Signed-off-by: Jakub Sokołowski <jakub@status.im>