let
  sources = import ./npins;
  system = builtins.currentSystem;
  pkgs = import sources.nixpkgs {
    inherit system;
    config = { };
    overlays = [ ];
  };
  treefmt = import ./nix/treefmt.nix { };
  kueuectl = pkgs.callPackage ./nix/kueuectl.nix { };
in
pkgs.mkShellNoCC {
  packages = [
    # dev tools
    pkgs.just
    pkgs.npins
    treefmt.config.build.wrapper

    # helm
    pkgs.helmfile
    pkgs.kubernetes-helm

    # kubectl tools
    pkgs.kubectl-cnpg
    pkgs.kubectl-neat
    pkgs.kubectl-graph
    pkgs.kubectl-klock
    pkgs.kubectl-rook-ceph

    # other tools activate when needed
    kueuectl
    # pkgs.step-cli
    # pkgs.linkerd
    # pkgs.cmctl
    # pkgs.rclone
    # pkgs.velero
    # pkgs.renovate
    # pkgs.graphviz
    # pkgs.hubble
    pkgs.cilium-cli
    pkgs.dapr-cli
  ];

  # Environment variables
  ARGOCD_ENV_CLUSTER_NAME = "ekman";
  HELM_GIT_ACCESS_TOKEN = "glpat-xxx";
  API_SERVER_IP = "localhost";
  API_SERVER_PORT = "7445";

  # Alternative shells
  passthru = pkgs.lib.mapAttrs (name: value: pkgs.mkShellNoCC (value // { inherit name; })) {
    ci-shell = {
      packages = [
        pkgs.npins
      ];
    };
  };
}
