Wayland using home-manager

I am trying to install sway/Wayland in NixOS 23.05 using Home-Manager (without flakes).

I would like to follow the wiki Sway - NixOS Wiki.
So I have set security.polkit.enable = true; and added
wayland.windowManager.sway = { ... };

However, nixos-rebuild throws an exception:

building the system configuration...
error: The option `wayland' does not exist. Definition values:
       - In `/etc/nixos/home.nix':
           {
             windowManager = {
...

But in the reference the option is mentioned:

https://rycee.gitlab.io/home-manager/options.html#opt-wayland.windowManager.sway.enable

What am I doing wrong?

Thanks for your advice.

I haven’t checked, but that HM module is probably new(ish) and not in stable.
So you may have to set your flake inputs to unstable. Since it’s discouraged to have nixpkgs and home-manager from different branches (trust me, they’re right about that), that would mean to also change your nixpkgs to unstable.

Thanks for your hint.
I use stable HM:

 home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-${nixRelease}.tar.gz" ;

The wayland module is only on unstable right now.

Thanks for your reply.
Any estimation when the wayland module will be in stable?