# SPDX-FileCopyrightText: 2024 Auxolotl Infrastructure Contributors
# SPDX-FileCopyrightText: 2024 Clicks Codes
#
# SPDX-License-Identifier: GPL-3.0-only

{
  description = "Clicks Infrastructure";

  inputs = {
    deploy-rs = {
      url = "github:serokell/deploy-rs";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    flake-utils.url = "github:numtide/flake-utils";

    impermanence.url = "github:nix-community/impermanence";

    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

    snowfall-lib = {
      url = "github:snowfallorg/lib";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    sops-nix = {
      url = "github:Mic92/sops-nix";
      inputs = {
        nixpkgs.follows = "unstable";
        nixpkgs-stable.follows = "nixpkgs";
      };
    };

    unstable.url = "github:nixos/nixpkgs/nixos-unstable";

    aux--docs-site = {
      url = "git+https://git.auxolotl.org/auxolotl/docs-site";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.snowfall-lib.follows = "snowfall-lib";
      inputs.wiki.follows = "aux--wiki";
    };
    aux--wiki = {
      url = "git+https://git.auxolotl.org/auxolotl/wiki";
      flake = false;
    };
  };

  outputs =
    inputs:
    let
      lib = (inputs.snowfall-lib.mkLib {
        inherit inputs;

        src = ./.;

        snowfall = {
          namespace = "clicks";
        };
      }).snowfall.internal.system-lib;
    in
    lib.mkFlake {
      overlays = with inputs; [ ];

      systems.modules.nixos = [
        inputs.impermanence.nixosModules.impermanence
        inputs.sops-nix.nixosModules.sops
      ];

      deploy = lib.clicks.deploy.mkDeploy {
        inherit (inputs) self;
        overrides = {
          teal.hostname = "teal.alpha.clicks.domains";
        };
      };

      outputs-builder = channels: {
        specs = let
          nixFiles = lib.snowfall.fs.get-nix-files-recursive ./.;
          specFiles = builtins.filter (lib.clicks.strings.endsWith ".spec.nix") nixFiles;
          importedSpecs = lib.forEach specFiles (file: {
            name = builtins.unsafeDiscardStringContext (builtins.baseNameOf file);
            value = import file {
              inherit channels lib;
            };
          });
        in builtins.listToAttrs importedSpecs;

        formatter = channels.nixpkgs.nixfmt-rfc-style;

        checks = let
          allChecks = {
            deploy-rs = lib.deploy-rs.${channels.nixpkgs.system}.deployChecks inputs.self.deploy;
            clicks = lib.clicks.checks channels.nixpkgs;
          };

          mergedChecks = lib.trivial.pipe allChecks [
            (lib.attrsets.mapAttrsToList (sourceName: (lib.attrsets.mapAttrsToList (checkName: value: {
              name = "${sourceName}:${checkName}";
              inherit value;
            }))))
            lib.lists.flatten
            builtins.listToAttrs
          ];
        in mergedChecks;
      };
    };
}
