{
  lib,
  config,
  ...
}: let
  cfg = config.myConfig.cache;
in {
  options.myConfig.cache = {
    enable = lib.mkEnableOption "extra binary caches";
  };

  config = lib.mkIf cfg.enable {
    nix.settings = {
      substituters = ["https://nix-community.cachix.org"];
      trusted-public-keys = [
        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      ];
    };
  };
}
