If you only use it for occasional ios dev, rather get a mac mini. As a bonus, when your done with it, put asahi linux on it and itd be a great home server.
I've considered that and might end up taking that route but the nice thing about a MacBook is I can take it with me on trips and learn iOS when I get bored.
There's a big server rack at home with multiple servers, so the Linux server part isn't a draw in my case.