Generally, within an acute care setting or clinic setting, once you have a few years of experience, it shouldn't be too difficult to switch between specialties. For other types of nursing roles (school nurse, public health nurse, occupational health nurse, case management...), many jobs PREFER certain experience but don't require it. It's more a matter of being a quick learner and being there ready to take a job when someone needs a nurse and can't easily find someone who already has a strong background in that area. If you're persistent and motivated, you should be able to find varied opportunities as a nurse.
Still, most people would recommend getting a few years experience in acute care since that experience is what most employers are looking for when they hire a nurse. And if you work outside of acute care for several years, even if in long term care or home health care, hospitals will be reluctant to hire you because they'd worry that your skills weren't sufficient to handle more acute patients. Though, with persistence and a refresher course, one could probably eventually get back into acute care.
While there are a wide variety of jobs that nurses are technically qualified for, many of the alternate directions nurses can take DO depend upon at least a few years of clinical experience in a related area. For example, to be a research nurse in oncology, they'd want someone with a few years experience with oncology patients. What kind of experience? It could be outpatient chemo, but how do you get the outpatient chemo positions? By having a year or two on an inpatient oncology unit.
Same thing for legal nurse consultant. You'd need experience in specific area to really be qualifed to give an "expert opinion" on the nursing care in question.
In those places that will hire nurses into positions without related experience, you have to ask yourself how comfortable you are with that. For example, home health care generally wants nurses with a few years inpatient experience since they'll be working on their own in the field. However, a desperate agency might hire a new grad and put the responsibility on you to gauge your ability to handle it.
This is just my perspective on it. Let's hear what others have to say!