{ lib, config, ... }:
{
  programs.ssh.enable = true;
  programs.ssh.matchBlocks = {
    "*" = {
      identityFile = "${config.home.homeDirectory}/.ssh/main_key";
    };
    ela = lib.hm.dag.entryBefore ["eiger"] {
      hostname = "ela.cscs.ch";
      user = "rmoll";
      identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
      identitiesOnly = true;
    };

    eiger = {
      hostname = "eiger.cscs.ch";
      user = "rmoll";
      identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
      identitiesOnly = true;
      proxyJump = "ela";
    };
  };
}
