summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-03-20 12:12:19 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2023-03-20 12:12:19 +0100
commit34f476d40e178ce082c4ac0aa2e86116fa7fb5d8 (patch)
tree81dfda2f634303b832a13fef43e10a2bf740b523 /modules
parent7b36035824d7d19b08b99feca449599ceffa8905 (diff)
downloadnixos-34f476d40e178ce082c4ac0aa2e86116fa7fb5d8.tar
nixos-34f476d40e178ce082c4ac0aa2e86116fa7fb5d8.tar.gz
nixos-34f476d40e178ce082c4ac0aa2e86116fa7fb5d8.tar.bz2
nixos-34f476d40e178ce082c4ac0aa2e86116fa7fb5d8.tar.xz
nixos-34f476d40e178ce082c4ac0aa2e86116fa7fb5d8.zip
...
Diffstat (limited to 'modules')
-rw-r--r--modules/openssh.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/modules/openssh.nix b/modules/openssh.nix
new file mode 100644
index 00000000..0ac2d2c6
--- /dev/null
+++ b/modules/openssh.nix
@@ -0,0 +1,75 @@
1{ ... }:
2
3with lib;
4
5{
6 options = {
7 services.openssh = {
8 settings.HostKeyAlgorithms = mkOption {
9 type = types.listOf types.str;
10 default = [
11 "ssh-ed25519"
12 "ssh-ed25519-cert-v01@openssh.com"
13 "sk-ssh-ed25519@openssh.com"
14 "sk-ssh-ed25519-cert-v01@openssh.com"
15 "ecdsa-sha2-nistp256"
16 "ecdsa-sha2-nistp256-cert-v01@openssh.com"
17 "ecdsa-sha2-nistp384"
18 "ecdsa-sha2-nistp384-cert-v01@openssh.com"
19 "ecdsa-sha2-nistp521"
20 "ecdsa-sha2-nistp521-cert-v01@openssh.com"
21 "sk-ecdsa-sha2-nistp256@openssh.com"
22 "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com"
23 "webauthn-sk-ecdsa-sha2-nistp256@openssh.com"
24 "ssh-dss"
25 "ssh-dss-cert-v01@openssh.com"
26 "ssh-rsa"
27 "ssh-rsa-cert-v01@openssh.com"
28 "rsa-sha2-256"
29 "rsa-sha2-256-cert-v01@openssh.com"
30 "rsa-sha2-512"
31 "rsa-sha2-512-cert-v01@openssh.com"
32 ];
33 };
34 settings.CASignatureAlgorithms = mkOption {
35 type = types.listOf types.str;
36 default = [
37 "ssh-ed25519"
38 "ecdsa-sha2-nistp256"
39 "ecdsa-sha2-nistp384"
40 "ecdsa-sha2-nistp521"
41 "sk-ssh-ed25519@openssh.com"
42 "sk-ecdsa-sha2-nistp256@openssh.com"
43 "rsa-sha2-512"
44 "rsa-sha2-256"
45 ];
46 };
47 settings.PubkeyAcceptedAlgorithms = mkOption {
48 type = types.listOf types.str;
49 default = [
50 "ssh-ed25519"
51 "ssh-ed25519-cert-v01@openssh.com"
52 "sk-ssh-ed25519@openssh.com"
53 "sk-ssh-ed25519-cert-v01@openssh.com"
54 "ecdsa-sha2-nistp256"
55 "ecdsa-sha2-nistp256-cert-v01@openssh.com"
56 "ecdsa-sha2-nistp384"
57 "ecdsa-sha2-nistp384-cert-v01@openssh.com"
58 "ecdsa-sha2-nistp521"
59 "ecdsa-sha2-nistp521-cert-v01@openssh.com"
60 "sk-ecdsa-sha2-nistp256@openssh.com"
61 "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com"
62 "webauthn-sk-ecdsa-sha2-nistp256@openssh.com"
63 "ssh-dss"
64 "ssh-dss-cert-v01@openssh.com"
65 "ssh-rsa"
66 "ssh-rsa-cert-v01@openssh.com"
67 "rsa-sha2-256"
68 "rsa-sha2-256-cert-v01@openssh.com"
69 "rsa-sha2-512"
70 "rsa-sha2-512-cert-v01@openssh.com"
71 ];
72 };
73 };
74 };
75}