Allowing your player to take Perception here would probably be against Rules as Intended
RAW your player can choose proficiency in two from five options as a Cleric:
History, Insight, Medicine, Persuasion, and Religion
And as a Knowledge domain cleric also gains proficiency in two of the following four skills:
Arcana, History, Nature, or Religion
Ruling that because they have chosen History from both of these categories they may instead choose proficiency in a skill not normally available to Clerics seems like an unnecessary exploit to me (they can easily get perception elsewhere).
They are not being forced in to taking History twice - they have a number of other legitimate options.
This rule could be argued to RAW suggest it's viable:
If a character would gain the same proficiency from two different sources, he or she can choose a different proficiency of the same kind (skill or tool) instead. (PHB p.126)
This rule normally applies to duplicated proficiencies that come from both a class feature and a background feature, not both from a class feature (as in this instance) but could be argued to apply here also.
However, as Slagmoth has suggested, this rule applies to proficiencies from two different sources (ie. background, class, race). It could be argued that class and domain proficiencies both come from ultimately just one source - 'class', so this rule would not apply here.
Further, circumstancial evidence against applying that rule in this situation, that you may consider authoritative, can be found on DnD Beyond.
Using the DnD Beyond character builder if you have already received a background proficiency from your class then you are offered a free choice as an alternative to receiving a duplicate (in line with the above rule).
In contrast, if you select History proficiency for your Knowledge domain feature, having already selected History as a general Cleric proficiency, it retrospectively removes History as an option from you Cleric proficiencies and makes you pick again from the remaining Cleric options. The same is true of an attempted double pick of Religion. You are not given a free choice instead as an option.
Finally, and perhaps more conclusively, Jeremy Crawford, 5th edition rules designer, whose twitter rulings many consider to be authoratative, has said that this rule should not be applied in this circumstance (credit V2Blast for finding this):
The proficiency rule for backgrounds applies when you gain your background at 1st level. It has no relevance outside that context.
If your player wants a Cleric with proficiency in perception they can easily get it from background (or elsewhere - I don't intent to list all possibilities here), rather than class features. Either:
- Take a relevant background that offers Perception.
- Take a background that offers any proficiency they already have (so that the above rule does now definitely apply to their situation).
- Create a new background that suits their needs using the rules in the PHB.
How best to respond to your player's double pick of History, with the above in mind, will depend on your table.
Allowing them to take proficiency in Perception, as you have done, is very unlikely to be gamebreaking, considering that they could easily have acquired that proficiency elsewhere. I would suggest you let it replace their 'class-picked' rather than 'domain-picked' proficiency in History. This is because the proficiencies granted by 'domain' are doubled. A double proficiency in Perception is more difficult for a Cleric to replicate through other features (though possible through multiclassing) and definitely more likely to upset game balance than allowing just a single proficiency in Perception.
However, for tables that want to stick closely to RAW I'd advise just asking the player to repick a skill, that they don't already have, from either of the available lists. This should be enforced especially if it's the sort of table where leniently letting one person have a free pick of skills might rankle with the other players.
The player will need to remember that their picks from the domain list grant doubled proficiency - so it will matter mechanically which skills they choose from which list - they aren't completely interchangable.