Here is a hook for someone using Tailscale on their server to be able to use Tailscale Magic DNS without clobbering dnsmasq:
/etc/yunohost/hooks.d/conf_regen/44-dnsmasq_local
#!/usr/bin/env bash
action=$1
pending_dir=$4
etc_dnsmasq_local_conf=$pending_dir/../dnsmasq/etc/dnsmasq.d/local.conf
[[ "$action" == "pre" ]] || exit 0
[[ -e $etc_dnsmasq_local_conf ]] || exit 0
cat << EOF > $etc_dnsmasq_local_conf
# change tailnet_name to yours
server=/*.tailnet_name.ts.net/100.100.100.100
EOF
Use --accept-dns=false when you run tailscale up or tailscale set