How to do post-start setup of k3s with a script

Hi,

I have a nixos setup with k3s.
I want to install some “bootstrap” software (argocd to be precise) on that k3s and would love to do that with a script in my nixos setup, that runs after k3s has been started.

So I tried:

 system.activationScripts  = {
      initArgoCD = ''
      set -e
      export KUBECONFIG="/etc/rancher/k3s/k3s.yaml"
      kubectl ...
      '';
    };

While this works during installation, the script is also executed during boot time and there it does not work (I think network is not even there yet).

What would be a better place for a script, setting up some stuff in k3s during installation?

Thanks!