My thought is to repurpose it either as a hardware firewall since it has two enet ports, or NAS - ideally running headless, and would be able to be admin'd by the other Macs in the house.
My last Linux experience was Gentoo in 2004, and Slackware before that. I'm not afraid of CLI, but it's been 20 years, so what little I remember is probably completely outmoded in 2023.
Any advice for distros that would work for this use case?
But I'd be tempted to put Proxmox on it and then run containers for each function. Then you get purpose-crafted solutions for each use case, but can easily plug new functions in or shut them down based on what you decide later.
I’d second this. I’ve installed Proxmox installed on some Mac Minis and they do a credible job of it. A beefy Max Pro would be all the better.
I’ll add that if the main purpose is to be a NAS something like TrueNAS will be much more set-and-forget.
This is grossly overpowered for a firewall, so I wouldn’t go that route unless you want to do a virtual firewall on top of a general purpose hypervisor.
I see you say 'no resale value', but specs like that do 650,- to 700,- here in The Netherlands. Are you sure there is no value here? It seems as a firewall, it will consume lots of electricity. (Too much for 24/7?)
Debian is always a safe choice for almost everything. It’s also worth checking DistroWatch. They have a search that can filter which distros are developed for a specific task (it’s under “distribution category”).
Open Media Vault. It's Debian, but with a nice web UI on top to manage the system. It allows you to setup NAS-shares visually, so you don't have to rely on your ancient and possibly a bit rusty terminal knowledge. It also gives you the option to easily install portainer, a way to manage docker containers, like a firewall