Need a gui startup hook for script

Hello. Is there a way in nixos to run a quick script right after graphical login. In ubuntu I create .xsessionrc in the user home folder. This is not working in nixos. Also I have tried .xinitrc - also not working. I want to run a simple command:

xhost +si:localuser:jm

Here is a snippet of my configuration:

services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.xfce.enable = true;
 environment.systemPackages = with pkgs; [
    cifs-utils
    firefox
    libreoffice
    hunspell
    hunspellDicts.en_US
    xscreensaver
    galculator
    xfce.xfce4-notes-plugin
    evince
    cups-dymo
    wine
    xorg.xhost
    home-manager
  ];

I have tested the file/script in the terminal and it executes fine. Seems that it is just not being hooked in. Is there a better way?

Did you tested setupCommands?