Personally I think that the first clue the astronauts would get would be "hey, no new email this morning", followed a bit later by "No one's replied to the messages I sent last night either". That'd probably turn into "Why's everyone quiet?" and "Is my equipment broken?" My (unresearched) impression of mission control protocols is that near-constant 2-way comms are standard. In a human-on-Mars scenario, that's going to be emails / direct messages with regular updates to mission plans, reminders to take vitamins & do exercises, feedback on previous day's experiments, health monitoring, etc. With one-way light travel time between 3 - 23 minutes one way, I'd expect the Martians to know something was wrong by the time they finished their morning cups of coffee. Also note that a need for redundancy in all systems means it's unlikely there's only one person on the Red Planet - so someone may well be awake and at least nominally connected to Earth for live updates when comms stop.
As a more-subtle variant, you might have the automated messages continue, but human-contact & discussion channels would cease. Astronauts like to hear from their family back home (citation needed), and will likely be sending in journals/diaries & reports on personal interactions (for psychological monitoring & maintenance). I'd still expect it to become clear that something is very wrong within a day or less of NASA going dark. (And if NASA doesn't go dark, they'll report the problem explicitly: "Moscow nuked Beijing. We're a bit busy down here. Good luck.")
At whatever point the communication issue is detected, typical engineering & scientific training necessary to maintain, diagnose & repair the comms equipment & computers gets top priority for the astronauts. It should be fairly easy to establish that everything on the Mars end is working as intended, especially if they're still getting feeds of ambient radiation, automated messages from Earth, and/or noise spikes when they aim their radio antenna at the Sun, and radio-silence when they aim away. Even without a direct analog comms channel, there are probably logs which will give very precise timing of changes to connection status & power level. (Kibana normally logs at the millisecond level.) With those in hand, the Martians will be able to quickly scan through whatever other instruments they've got on hand for other anomalies that happened about the same time.
For detectable scale, both the radio transmissions from Earth (probably on the order of 20kW or less and the EMP from the nuke(s) will be attenuated by the same factor. Based on a very loose reading of this article's breakdown of nuclear power distribution, I'd guess a 1 MT nuke puts around 50 kT into nuclear radiation from the initial burst and a substantial fraction of that (say around 5 kT) into an EMP - even without trying to make an EMP-focused bomb. That article uses "1 minute" as the duration of the "initial burst", so let's go with that and note that 1 kT = 4.18 * 10^12 J. Multiply by 5 kT and divide by 60 s/min and you've got a power output from your single nuke of around 3 * 10^11 Watts - which is seven orders of magnitude more than your DSN transmitter.
At this point, the Martians know "incoming RF power spike then silence". If they've got decent equipment for looking at the Sun to detect CMEs & flares - which would probably be important to manage their expected radiation exposure - they can probably rule out that RF power spike coming from everyone's favorite ongoing fusion reaction. So they know something went wrong back home and they're now on their own.
Will they know it was a nuke though? 50 kT of radiation = 2 * 10^14 J gets spread out to 2 * 10^-7 J/m^2, or 4*10^-9 W/m^2 by the time it gets as far as Mars. That's not a lot, but 1 GeV particles from cosmic rays show up at around 10^4 /m^2/s. I'd guess most of the direct radiation from a nuke was going to be in the 1-MeV class. Blindly extending that cosmic-ray chart down a few orders of magnitude, we've got a background flux of maybe 10^8 MeV particles per m^2/s, or around 1.6 * 10^-11 W/m^2. So the Martians will see a spike in MeV-class radiation from the direction of Earth, to something like 10 times background levels - assuming they've got basic radiation monitoring which can distinguish solar storms, cosmic rays, and local-to-Mars or Martian-nuclear-power-plant sources on the correct time scales. I don't know that that detail of monitoring is required for a mission to Mars, but I'd certainly call it plausible given how important it is to keep humans alive outside Earth's magnetosphere for extended periods of time in this scenario.
I've made a bunch of assumptions and skipped over some of the details of the math, so don't take my numbers as gospel, but... they should be enough to write some fiction.