{
  config,
  lib,
  pkgs,
  ...
}:

{
  imports = [ ];

  options.me = {
    gcloud.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      example = true;
      description = "Whether we want to install gcloud.";
    };
  };

  config = lib.mkIf config.me.gcloud.enable {
    environment.systemPackages = with pkgs; [
      (google-cloud-sdk.withExtraComponents [ google-cloud-sdk.components.gke-gcloud-auth-plugin ])
    ];

    environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
      hideMounts = true;
      users.talexander = {
        directories = [
          {
            directory = ".config/gcloud";
            user = "talexander";
            group = "talexander";
            mode = "0700";
          }
        ];
      };
    };
  };
}
