vazub
Excellent, I didn't know that. So would it look something like this:
permit setenv { EDITOR=vim } dave
OR
permit setenv { ENV=/home/dave/.vimrc } dave
OR, can I just set this for the wheel group with:
permit setenv { ENV=/home/dave/.vimrc } wheel ?
For keepenv however, would something like permit keepenv :wheel be sufficient?
Although, I read that "sometimes, there are situations where overwriting every environment variable can break things" so therefore keepenv may not be the best solution. Unless of course I could use it something like this:
permit keepenv dave cmd vim, which I assume would apply only to my user and the vim command respectively?
I will play around with this when I'm back at my machine (currently on my work laptop).
I may use this solution on my Void box as I still use doas there. On my NetBSD system however It would be handy if I could just continue to use the above sued scripts which simply utilises su and still preserve the user environment.