aboutsummaryrefslogtreecommitdiff
path: root/homes/floppydisk/ssh.nix
blob: e59d218fb5eeebc3d87b1e76743992ba95c06931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  nixosConfig,
  config,
  lib,
  ...
}: let
  _1passwordAgent = {
    enable = nixosConfig != {} && nixosConfig.programs._1password-gui.enable && nixosConfig.programs._1password-gui.sshAgent;
    path = "${config.home.homeDirectory}/.1password/agent.sock";
  };
in {
  programs.ssh = {
    enable = true;
    forwardAgent = _1passwordAgent.enable;
    extraConfig = ''
      Host *
        IdentityAgent ~/.1password/agent.sock
    '';
  };
}