Hello and thank you for your question.
From the seller's perspective, the money being received for a covenant not to compete is treated as ordinary income similar to compensation. It is not passive income (IRC 469).
From the buyer's perspective, a covenant not to compete is considered an IRC 197 intangible asset and is amortized over 15 years. IRC 197 is here:
(d) Section 197 intangible For purposes of this section-
(1) In general Except as otherwise provided in this section, the term "section 197 intangible" means-
(E) any covenant not to compete (or other arrangement to the extent such arrangement has substantially the same effect as a covenant not to compete) entered into in connection with an acquisition (directly or indirectly) of an interest in a trade or business or substantial portion thereof...
The valuation of a covenant not to compete can be tricky. In order to show a time frame that adheres to the underlying economic transaction, it is necessary to show that the seller would have an ability to compete in addition to any initial and potentially on-going intention of competing. There have been quite a few court cases over the years. A good review of the history and some cases can be found here:
Note the economic reality test in the above link:
"As noted above, the "economic reality" test applies when the Service has reason to question whether a covenant not to compete was really necessary or when there appears to be an excessive allocation to the covenant. This test may also be applied when one party to the transaction has ignored or denied the allocated amount for the covenant that is stated in the agreement."
I hope this information is helpful to you. Thank you again for your question!