nixos/home-manager-modules/ssh.nix

25 lines
442 B
Nix

{ config, lib, ... }:
let
cfg = config.ssh;
agentPath = "~/.1password/agent.sock";
in
{
options = {
ssh.enable = lib.mkEnableOption "enable ssh module";
};
config.programs.ssh = lib.mkIf cfg.enable {
enable = true;
forwardAgent = true;
extraConfig = ''
Host *
IdentityAgent ${agentPath}
Host bromine
HostName 192.168.1.200
User mbessette
ForwardAgent yes
'';
};
}