Qtile 0.18.0, restart quits to display manager

I am using the latest qtile from nixos-unstable channel. The session is configured with home manager xsession. When restarting qtile with either lazy.restart() or qtile cmd-obj -o cmd -f restart, the system quits and shows lightdm. The 0.16.0 in nixos-21.05 works perfectly with this. I’m not sure if this is a qtile issue or a nix specific issue.

Here’s the relevant config https://github.com/addy419/configurations/blob/9d0b0e465dbd0e9b0d46ed883702201922a654a3/hm-modules/qtile.nix and https://github.com/addy419/configurations/blob/9d0b0e465dbd0e9b0d46ed883702201922a654a3/modules/desktop/qtile.nix

I have also raised the same issue on https://github.com/qtile/qtile/issues/2752

I found the issue. In case someone faces the same issue, check https://github.com/nix-community/home-manager/issues/2312