blob: b3c29dd3666c2f7a210e6067703c106654f5836d (
plain) (
blame)
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
57
58
59
60
61
62
|
{ config, pkgs, lib, ... }:
let
inherit (lib) concatStringsSep;
mkDefault = lib.mkOverride ((lib.mkDefault null).priority - 1);
# SSL added and removed here ;-)
bannedAlgorithms = [
"ecdsa-sha2-nistp256-cert-v01@openssh.com"
"ecdsa-sha2-nistp384-cert-v01@openssh.com"
"ecdsa-sha2-nistp521-cert-v01@openssh.com"
"ecdsa-sha2-nistp256"
"ecdsa-sha2-nistp384"
"ecdsa-sha2-nistp521"
];
in
{
programs.mosh.enable = mkDefault config.services.openssh.enable;
programs.ssh.extraConfig = ''
CASignatureAlgorithms -${concatStringsSep "," bannedAlgorithms}
HostKeyAlgorithms -${concatStringsSep "," bannedAlgorithms}
Host uhura spock
HostName %h.edef.eu
Host hyperion
HostName %h.kookie.space
Host atuin
HostName %h.qyliss.net
Host github gitlab
HostName %h.com
Match host github.com,gitlab.com
User git
'';
services.openssh.authorizedKeysFiles = [ "${./keys}/%u.keys" ];
services.openssh.strictModes = false;
users.users.root.openssh.authorizedKeys.keyFiles = [ ./keys/qyliss.keys ];
programs.ssh.knownHosts = {
"github.com" = {
publicKeyFile = ./keys/github.keys;
};
"gitlab.com" = {
publicKeyFile = ./keys/gitlab.keys;
};
"edef" = {
certAuthority = true;
hostNames = [ "edef.eu" "*.edef.eu" ];
publicKeyFile = ./keys/edef.keys;
};
};
}
|