I think んです/なんです and なんです/なのです have same meaning but which is correct to choose is depending on the adjective or verb just before these patterns.
For example,
きれい(beautiful)→きれい+なのです→きれいなのです
かわいい(cute)→かわいい+のです→かわいいのです
好き(like)→好き+なのです→好きなのです
歩く(walk)→歩く+のです→歩くのです
And if the word just before these pattern is noun, なのです/なんです is always correct.
For example,
日本人(Japanese person)→日本人+なのです→日本人なのです
学生(student)→学生+なのです→学生なのです