{
  inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
  inputs.nixpkgs.follows = "clan-core/nixpkgs";

  outputs =
    { self, clan-core, ... }:
    let
      # Usage see: https://docs.clan.lol
      clan = clan-core.lib.clan {
        inherit self;

        inventory =
          { ... }:
          {
            meta.name = "foo";
            machines.peer1 = { };
            machines.admin1 = { };
            services = {
              legacy-module.default = {
                roles.peer.machines = [ "peer1" ];
                roles.admin.machines = [ "admin1" ];
              };
            };

            instances."test" = {
              module.name = "new-service";
              module.input = "self";
              roles.peer.machines.peer1 = { };
            };

            modules = {
              legacy-module = ./legacy-module;
            };
          };

        modules.new-service = {
          _class = "clan.service";
          manifest.name = "new-service";
          roles.peer = { };
          perMachine = {
            nixosModule = {
              # This should be generated by:
              # nix run .#generate-test-vars -- checks/service-dummy-test service-dummy-test
              clan.core.vars.generators.new-service = {
                files.not-a-secret = {
                  secret = false;
                  deploy = true;
                };
                files.a-secret = {
                  secret = true;
                  deploy = true;
                  owner = "nobody";
                  group = "users";
                  mode = "0644";
                };
                script = ''
                  # This is a dummy script that does nothing
                  echo -n "not-a-secret" > $out/not-a-secret
                  echo -n "a-secret" > $out/a-secret
                '';
              };
            };
          };
        };
      };
    in
    {
      # all machines managed by Clan
      inherit (clan.config) nixosConfigurations nixosModules clanInternals;
    };
}
