{ config, ... }:
let
  username = "emmie";
  userhome = "/home/${username}";
in
{
  clan.inventory = {
    tags = {
      emmie = [ "rana" ];
    };

    instances = {
      emmie-syncthing = {
        module = {
          name = "syncthing";
          input = "clan-core";
        };
        roles.peer.tags.emmie = { };
        roles.peer.settings = {
          folders = {
            Syncthing = {
              path = "${userhome}/Share/Syncthing";
            };
          };
          extraDevices = {
            pixel7a = {
              id = "CEUJMEG-SOHXIJF-G2FT5QB-6MZW3EN-PONI3QN-HPEIOSU-IMSLGW7-XUU6BQK";
              name = "eris";
              addresses = [ "dynamic" ];
            };
          };
        };
        roles.peer.extraModules = [
          {
            config.services.syncthing = {
              user = username;
              dataDir = "${userhome}/Share";
            };
          }
        ];
      };
    };
  };
}
