Cannot setup email password declaratively

Hi, I am trying to set up thunderbird declaratively. Here’s my config:

{ pkgs, config, current, ... }:

  programs.thunderbird = {
    enable = true;
    profiles.${current.user} = {
      isDefault = true;
  }; = {
    accounts.outlook = {
      realName = "name";
      address = "email id";
      userName = "email id";
      primary = true;
      imap = {
        host = "";
        port = 993;
      passwordCommand = "cat ${}";
      thunderbird = {
        enable = true;
        profiles = [ "${current.user}" ];

but for some reason, thunderbird keeps asking me for password. I have checked /run/agenix.d/1/microsoft and it contains the password. I’m not sure what I’m doing wrong here.

passwordCommand is for the various fetcher services, Thunderbird has no way of using it. I somewhat doubt it supports any of the email account settings, actually. I think Thunderbird supports the secret service, though, so you can hook something like the gnome keyring or keepass to it.

Thunderbird filled in everything I mentioned except the password. Hence I thought it’d work.

Oh, really cool, seems the module converts those to a Thunderbird profile:

But the module does not use passwordCommand. I’d assume this is because Thunderbird has no way to execute a shell command for authentication, which isn’t really expected from a glossy GUI client.

Thanks for checking. I should have checked it before asking the question tbf, but I forgot.