nixrc: largely rewritten