anchor.diff:            KEY="$(head -n1 ${secretKey})"
             DBPASS="$(head -n1 ${cfg.database.passwordFile})"
             JWTSECRET="$(head -n1 ${jwtSecret})"
  +          ${if (cfg.mailerPasswordFile == null) then ''
  +            MAILERPASSWORD="#mailerpass#"
  +          '' else ''
  +            MAILERPASSWORD="$(head -n1 ${cfg.mailerPasswordFile} || :)"
  +          ''}
             sed -e "s,#secretkey#,$KEY,g" \
                 -e "s,#dbpass#,$DBPASS,g" \
                 -e "s,#jwtsecet#,$JWTSECET,g" \
  +              -e "s,#mailerpass#,$MAILERPASSWORD,g" \
                 -i ${runConfig}
             chmod 640 ${runConfig} ${secretKey} ${jwtSecret}
           ''}
  
positive.code:         description = "Upper level of template and static files path.";
        };
  
        disableRegistration = mkEnableOption "the registration lock" // {
          description = ''
            By default any user can create an account on this <literal>gitea</literal> instance.
  
negative.code:     [service]
      DISABLE_REGISTRATION = ${boolToString cfg.disableRegistration}
  
      ${optionalString (cfg.mailerPasswordFile != null) ''
        [mailer]
        PASSWD = #mailerpass#
      ''}
  
      ${cfg.extraConfig}
    '';
  in
  