aboutsummaryrefslogtreecommitdiff
path: root/home-manager/ssh-agent/default.nix
blob: 1cf69075d5d333d03ea9509d2976150d3b60c319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ config, lib, ... }:
{
	programs.ssh = {
		enable = true;

		enableDefaultConfig = false;

		matchBlocks = {
			"*" = {
				addKeysToAgent = "yes";
				forwardAgent = false;
			  serverAliveInterval = 0;
			  serverAliveCountMax = 3;
				identitiesOnly = true;
			};

			"github.com" = {
				hostname = "github.com";
				user = "git";
				identityFile = "~/.ssh/commits";
			};

			"aethrvmn.gr" = {
				hostname = "aethrvmn.gr";
				identityFile = "~/.ssh/connections";
			};

			"theke.ml" = {
				hostname = "theke.ml";
				identityFile = "~/.ssh/connections";
			};

			"apo.theke.ml" = {
				hostname = "apo.theke.ml";
				user = "git";
				port = 222;
				identityFile = "~/.ssh/theke";
			};

			"code.aethrvmn.gr" = {
				hostname = "code.aethrvmn.gr";
				identityFile = "~/.ssh/commits";
			};

			"velor.gr" = {
				hostname = "velor.gr";
				identityFile = "~/.ssh/velor";
			};
		};
	};

  services = {
    # disable gNOME's "usecase?" ssh-agent
    gnome.gcr-ssh-agent.enable = lib.mkForce false;
  };
}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.