{
  pkgs,
  config,
  ...
}: {
  users.users.someone.packages = with pkgs; [
    openssh
  ];

  home.file.".ssh/config".text = ''
    AddKeysToAgent yes
    CheckHostIP yes
    Compression no
    ControlMaster no
    ControlPath ~/.ssh/master-%r@%n:%p
    ControlPersist no
    HashKnownHosts yes
    IdentitiesOnly yes
    PasswordAuthentication no
    ForwardAgent no
    ForwardX11 no
    ForwardX11Trusted no
    ServerAliveInterval 60
    ServerAliveCountMax 3
    UserKnownHostsFile ~/.ssh/known_hosts

    Host git.severijnse.eu
      HostName git.severijnse.eu
      Port 222
      User git
      IdentityFile /run/secrets/gitea_laptop

    Host hetzner
      HostName severijnse.eu
      User admin
      IdentityFile /run/secrets/hetzner_server

    Host github.com
      HostName github.com
      User git
      IdentityFile /run/secrets/github_laptop

    Include ~/.ssh/config.d/*
  '';

  systemd.user.services.ssh-agent = {
    description = "SSH agent service";
    wantedBy = ["default.target"];
    serviceConfig = {
      Type = "simple";
      ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a ${config.xdg.runtimeDir}/ssh-agent.socket";
      Restart = "on-failure";
    };
  };
}
