1{ ... }:
2{
3 programs.ssh = {
4 enable = true;
5 enableDefaultConfig = false; # silent warning
6
7 matchBlocks = {
8 # most intuitive design /s
9 patchy = {
10 # host is set to the match block name by default but it is not in the manual/option docs.
11 hostname = "koumakan";
12 user = "forgejo";
13 };
14
15 gh = {
16 hostname = "github.com";
17 user = "git";
18 };
19
20 backup = {
21 hostname = "koumakan";
22 user = "forgejo";
23 identitiesOnly = true;
24 identityFile = "~/.ssh/id_minecraft_backup";
25 };
26
27 "*" = {
28 forwardAgent = true;
29 compression = false;
30 serverAliveInterval = 0;
31 serverAliveCountMax = 3;
32 hashKnownHosts = true;
33 userKnownHostsFile = "~/.ssh/known_hosts";
34 # visualHostKey = true; # if this doesn't work im moving to hjem
35 };
36 };
37
38 # extraConfig is config for the Host * block.
39 ## n.b.: identitesonly and identityfile makes bootstrapping other devices hard esp.
40 ## if they're embedded or resource constrained.
41 extraConfig = ''
42 VisualHostKey yes
43 '';
44 };
45}