Creating A Permanent Spell Effect (5e Variant Rule)
From D&D Wiki
Creating a Permanent Spell Effect
In the DMG, a filler page helpfully mentions that if you cast a teleport circle on the same spot every day for a year, it becomes permanent. Although not explicitly presented as a rule, the concept is useful, as it gives a justifiable way to create persistent magical environmental effects without having to be incredibly high level, and without having to make permanent versions of normal spells. In other words, it's a nice mechanical shortcut if you use it.
However, actually casting a spell 365 times over the course of an in-game year is an exhausting activity best done off-screen; the very thing downtime activities are made for! This rule is an in-play shortcut to allow players to spend downtime days to create permanent magical effects, like teleportation circles, within the time frame of a campaign. (At 300xp per adventuring day, it should take about 3 and a half game years of nonstop adventuring to reach level 20. That's enough time to make 3 of these effects, minimum, and nothing stops players from continuing to adventure at max level.) The rule has been expanded to include any spell that creates a temporary environmental effect, because that just makes for more game material to work with.
Ok, let's get this ball rolling.
This downtime activity costs 365 downtime days and the associated lifestyle costs. In addition, the character must supply the components to cast the spell once for each of the 365 days.
So, for example, a Permanent light spell would only cost time and lifestyle, as long as you can keep hold of a firefly and some phosphorous moss for the full duration. Meanwhile, a permanent arcane lock would cost you 9,125gp in gold dust. Yowza.
You can work on multiple permanent effects simultaneously, with a limit of 1 per spell slot. So, for instance, if you have 3 level 2 spell slots, you can work on 3 level 2 permanent spell effects at the same time. You need to pay the full casting costs of all spells involved.
The 365 day expense assumes the game world is Earth-like. If the setting has a unique calendar, adjust this expense to match the proper duration of the year.
And that's about it! Remember That this is for envrionmental effects. So spells which create objects in the environment or only affects creatures or yourself, don't count. You can't give yourself a permanent aura of life, for example- but you can make a Permanent arcane gate! Permanent fly, not so much, but permanent levitate gives players a way of making actual flying castles, airships, and possibly even spelljammers if they stack a few more permanent effects on top!