This sounds very like the <PERSON> short story, Nano comes to Clifford Falls, first published in the July 2006 Asimov's and later printed in her story collection of the same name.
It tells the story of <PERSON>, her deadbeat husband <PERSON>, and their three children as civilization collapses because nobody needs to work anymore.
It has the people sharing time on the machine:
... "A car? A whole car?"
"Sure, why not? Nano can make anything. The town is starting with one request from each person, first come first served." ...
and later in the story:
Every morning people lined up to pick up whatever their food order'd been from the previous day, enough for all that day's meals plus a little over to store.
It has the people losing or quitting their jobs:
By late August the factory in Minneonta had closed. Most of the men in town who didn't farm were out of work, but nobody seemed to mind much. The Crow Bar was full all the time, groups playing cards and laughing at TV.
It has the attempted rape scene:
Clifford Falls wasn't that bad. But it wasn't that far out from the city, either. <PERSON> and I were watching TV one night, the kids in bed, when the door burst open and three men rushed in.
"Look at this—not just the one, two of them," one man said, while I was already reaching for the phone. He got there first and knocked it out of my hand. 514
"Not that it would help you, lady. Not a lot of police left. <PERSON>, I'll take this one and you take the fat girl."
It has the commune (<PERSON> farm) where people have to work:
July again and we are eighty seven people now. Word spreads. About half are people who fled nano, like me. The other half embraced it because it let them do whatever they'd wanted to do before. Some of those ones have their own nanomachines, little ones, made of course by other nanomachines. <PERSON> allows them to use nano to produce things for their jobs, but not to make food or clothing or shelter or anything else we all need to survive, except for some medicines, and we're working on that.
And finally, it mentions people doing guard duty at the farm:
He also farms and does guard duty and lays pipe and cans and cleans and cooks, of course. Like all the rest of us. 514