Hi Gregor,
I wasn't able to find a way to do this via OS-configuration alone. But here's an idea similar to the UOLOGIN one, only it's done outside of BASIC.
You could put a shim in for uvapi_slave. The shim would read the user's priority level in /etc/security/limits.conf, and then exec the true uvapi_slave with the priority it found.
The steps and code would be something like the following
1. Move $UVHOME/uvapi_slave to $UVHOME/uvapi_slave_real
2. Create $UVHOME/uvapi_slave_shim.sh as below; use the same permissions and ownership as $UVHOME/uvapi_slave
3. Create a new symlink from $UVHOME/uvapi_slave to $UVHOME/uvapi_slave_shim.sh
#!/bin/bash
#
# uvapi_slave_shim.sh
#
# find the priority for this user in limits.conf
# (whole-word matches only, and only at the beginning of a line)
priority=$(grep -w "^$(whoami)" /etc/security/limits.conf | grep priority | awk {'print $4'})
# see if we have a valid priority (between -20 and 19 inclusive)
if [[ $priority =~ ^[0-9]+$ ]] && ((-20 <= priority <= 19)); then
# valid priority level, so exec with nice
exec nice -n$priority ./uvapi_slave_real $@
else
# invalid priority level, fallback to plain execution
exec ./uvapi_slave_real $@
fi