refactor more nix configs out into common modules