Brew not working with sip enabled

Hi,
I don't really know if it's an issue or just the normal behaviour but it seems that I can only install/update brew when SIP is fully disabled in config.plist NVRAM section (csr-active-config:FF0F0000), if I let it enabled (csr-active-config:00000000) terminal says I dont have the rights to write the folder (/usr/local). Do you know how to fix that?

I can post my config.plist file if needed, I made my EFI only following dortania guide, everything is working great on the hack for months other than that.

Config :
- SMBIOS : iMac19,1
- i7-9700k
- Gigabyte z390 AORUS Elite
- 32Go RAM
- Vega 64 (full acceleration with iGPU enabled as headless)

submitted by /u/MSTRKKRFT
[link] [comments]