{ pkgs, config, ...}:

{
  services.mysql.package = pkgs.mariadb;

  services.firefox-syncserver = {
    enable = true;
    package = pkgs.syncstorage-rs;
    logLevel = "debug"; # error
    secrets = builtins.toFile "sync-secrets" ''
      SYNC_MASTER_SECRET=config.age.secrets.ff-sync.path;
    '';
    singleNode = {
      enable = true;
      hostname = "localhost";
      url = "http://localhost:5000";
    };
    # database = {
    #   createLocally = true;
    #   host = "localhost";
    #   user = "firefox-syncserver";
    #   name = "firefox_syncserver";
    # };
  };
}