blob: a9aa11be65eaefd79b109e8e598b9682a03db2e8 (
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
|
{
config,
lib,
...
}: let
cfg = config.collinux.terminal.programs.git;
in
lib.mkIf cfg.installKey {
# public key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3SjzIs3YI8PWJaNrAuaEeRcTcvIVHOKyCh2VwHTHEF"
collinux.secrets = {
"github-ssh-key" = {
file = ./github-ssh-key.age;
owner = config.collinux.user.name;
};
};
programs.ssh = {
knownHosts."github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
startAgent = true;
extraConfig = ''
Host github.com
User git
IdentityFile ${config.collinux.secrets."github-ssh-key".path}
IdentitiesOnly yes
AddKeysToAgent yes
Match host williamsfam.us.com user forgejo
IdentityFile ${config.collinux.secrets."github-ssh-key".path}
IdentitiesOnly yes
AddKeysToAgent yes
'';
};
}
|