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

{
  imports = [ ];

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

  config = lib.mkIf config.me.ssh.enable {
    environment.systemPackages = with pkgs; [
      sshfs
    ];

    environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
      hideMounts = true;
      users.talexander = {
        files = [
          ".ssh/known_hosts"
        ];
      };
      users.root = {
        files = [
          ".ssh/known_hosts"
        ];
      };
    };

    me.install.user.root.file = {
      ".ssh/config" = {
        source = ./files/ssh_config_root;
      };
    };
    me.install.user.talexander.file = {
      ".ssh/config" = {
        source = ./files/ssh_config;
      };
    };

    programs.ssh.extraConfig = ''
      Include ${./files/ssh_config_global}
    '';
  };
}
