Home Manager 25.11: kwallet pam for sway

sudo nix-channel --list               
home-manager https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz
nixos https://nixos.org/channels/nixos-25.11

Under Home Manager NixOS 25.05 the following config for sway made kwallet Pam work:

".config/sway/config" = {
  enable = true;
  source = pkgs.replaceVars {
    src =
      /etc/nixos/config/sway.conf; # contains @kwalletPam@/libexec/pam_kwallet_init
    kwalletPam = pkgs.kdePackages.kwallet-pam;
  };
};

whereas sway.conf contains the following line:

exec @kwalletPam@/libexec/pam_kwallet_init 1> ${HOME}/log/sway/pam_kwallet_init.out 2> ${HOME}/log/sway/pam_kwallet_init.err

However in 25.11 I get the following error:

error: A definition for option `home-manager.users.klt.home.file.".config/sway/config".source' is not of type `absolute path'. Definition values:
- In `/nix/store/c3464i7ag3v36rdndbqh461hvdgqgqng-home-manager-25.11.tar.gz/home-manager/nixos/common.nix': <function>

What do I need to change?
Where can I define the variable substitution?

What is the return type of pkgs.replaceVars?

I found the input types but not the output on:

https://noogle.dev/f/pkgs/replaceVars

Try wrapping it in a string interpolation.