anchor.diff:          description = "The state directory, logs and plugins are stored here.";
         };
   
  -      extraConfig = mkOption {
  -        type = types.lines;
  -        default = "";
  +      settings = mkOption {
  +        type = format.type;
  +        default = {};
           description = ''
  -          Extra configuration in configuration.yml.
  -
  -          See <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
  +          Redmine configuration (<filename>configuration.yml</filename>). Refer to
  +          <link xlink:href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration"/>
             for details.
           '';
           example = literalExample ''
  -          email_delivery:
  -            delivery_method: smtp
  -            smtp_settings:
  -              address: mail.example.com
  -              port: 25
  +          {
  +            email_delivery = {
  +              delivery_method = "smtp";
  +              smtp_settings = {
  +                address = "mail.example.com";
  +                port = 25;
  +              };
  +            };
  +          }
           '';
         };
   
  
positive.code:         message = "services.redmine.database.host must be set to localhost if services.redmine.database.createLocally is set to true";
        }
      ];
  
      services.mysql = mkIf mysqlLocal {
        enable = true;
  
negative.code:       ${optionalString (cfg.database.type == "mysql2" && cfg.database.socket != null) "socket: ${cfg.database.socket}"}
    '';
  
    configurationYml = format.generate "configuration.yml" cfg.settings;
  
    additionalEnvironment = pkgs.writeText "additional_environment.rb" ''
      config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
  