Alternative to system.autoUpgrade.dates

I’m using automatic updates. I would like to get this scheduled not by time (as with system.autoUpgrade.dates) but by something like a systemd condition (like “network.target” or “multi-user.target”) that checks the availability of any updates in my nixos channel.

I’ve checked the docu and the internet but wasn’t successful. Most likely I did miss something. Any suggestions?

p.s: As I run on a limited hardware I’ve done

systemctl set-property nixos-upgrade.service CPUQuota=20%

Did this with cron and below script:

#!/run/current-system/sw/bin/bash
##!/bin/bash
#
##set -x
#
sleep 300
##
zWget=/var/tmp/wget.nixos.channel.htm
#
zChannel=$(nix-channel --list | cut -d ' ' -f 2,2)
#
wget -O ${zWget} ${zChannel} 1> /dev/null 2> /dev/null
zRC=$?
#
if test ${zRC} -eq 0
then
  if test -f ${zWget}.old
  then
    if diff ${zWget} ${zWget}.old 1> /dev/null 2> /dev/null 
    then
      echo "Nothing to do"
    else
      systemctl start nixos-upgrade 1> /dev/null 2> /dev/null
      zRC=$?
      cp ${zWget} ${zWget}.old 1> /dev/null 2> /dev/null
    fi
  else
    systemctl start nixos-upgrade 1> /dev/null 2> /dev/null
    zRC=$?
    cp ${zWget} ${zWget}.old 1> /dev/null 2> /dev/null
  fi
fi
#
exit ${zRC}