How can I autostart dwm if login into tty1?

I want to start dwm using startx if I login to tty1 (but not the other ttys). My current solution is just adding a few lines to my fish config (i am using fish as my shell) like this:

 ... = {
    enable = true;

    interactiveShellInit = ''
      if status is-login
          if test -z "$DISPLAY" -a "$XDG_VTNR" = 1
              pkill -9 -t tty1

Is there a more nixos-y way of doing this? I want to try and avoid using a full displayManager, like sddm