Yes, hard-wired mains powered alarms can be wired to the unswitched live feed of the nearest frequently used lighting circuit.