anchor.diff:        ${optionalString (cfg.database.type == "mysql2" && cfg.database.socket != null) "socket: ${cfg.database.socket}"}
     '';
   
  -  configurationYml = pkgs.writeText "configuration.yml" ''
  -    default:
  -      scm_subversion_command: ${pkgs.subversion}/bin/svn
  -      scm_mercurial_command: ${pkgs.mercurial}/bin/hg
  -      scm_git_command: ${pkgs.gitAndTools.git}/bin/git
  -      scm_cvs_command: ${pkgs.cvs}/bin/cvs
  -      scm_bazaar_command: ${pkgs.breezy}/bin/bzr
  -      scm_darcs_command: ${pkgs.darcs}/bin/darcs
  -
  -    ${cfg.extraConfig}
  -  '';
  +  configurationYml = format.generate "configuration.yml" cfg.settings;
   
     additionalEnvironment = pkgs.writeText "additional_environment.rb" ''
       config.logger = Logger.new("${cfg.stateDir}/log/production.log", 14, 1048576)
  
positive.code: { config, lib, pkgs, ... }:
  
  let
    inherit (lib) mkDefault mkEnableOption mkIf mkOption types;
    inherit (lib) concatStringsSep literalExample mapAttrsToList;
    inherit (lib) optional optionalAttrs optionalString singleton versionAtLeast;
  
    cfg = config.services.redmine;
  
    bundle = "${cfg.package}/share/redmine/bin/bundle";
  
    databaseYml = pkgs.writeText "database.yml" ''
  
negative.code:         description = "The state directory, logs and plugins are stored here.";
        };
  
        settings = mkOption {
          type = format.type;
          default = {};
          description = ''
            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;
                };
              };
            }
          '';
        };
  
  