System: hardened ssh; Home: nvim added clangd lsp
This commit is contained in:
parent
b134fc16be
commit
d2cbfadf75
2 changed files with 50 additions and 3 deletions
|
|
@ -58,7 +58,7 @@
|
||||||
};
|
};
|
||||||
clang = {
|
clang = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lsp.enable = false;
|
lsp.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,54 @@
|
||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = !config.niksos.hardware.portable.enable;
|
openFirewall = !config.niksos.hardware.portable.enable;
|
||||||
settings.UseDns = true;
|
allowSFTP = false;
|
||||||
|
|
||||||
|
# https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67
|
||||||
|
settings = {
|
||||||
|
UseDns = lib.mkForce true; # Tailscale
|
||||||
|
LogLevel = "VERBOSE";
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = true;
|
||||||
|
|
||||||
|
KexAlgorithms = [
|
||||||
|
"curve25519-sha256@libssh.org"
|
||||||
|
"ecdh-sha2-nistp521"
|
||||||
|
"ecdh-sha2-nistp384"
|
||||||
|
"ecdh-sha2-nistp256"
|
||||||
|
"diffie-hellman-group-exchange-sha256"
|
||||||
|
];
|
||||||
|
Ciphers = [
|
||||||
|
"chacha20-poly1305@openssh.com"
|
||||||
|
"aes256-gcm@openssh.com"
|
||||||
|
"aes128-gcm@openssh.com"
|
||||||
|
"aes256-ctr"
|
||||||
|
"aes192-ctr"
|
||||||
|
"aes128-ctr"
|
||||||
|
];
|
||||||
|
Macs = [
|
||||||
|
"hmac-sha2-512-etm@openssh.com"
|
||||||
|
"hmac-sha2-256-etm@openssh.com"
|
||||||
|
"umac-128-etm@openssh.com"
|
||||||
|
"hmac-sha2-512"
|
||||||
|
"hmac-sha2-256"
|
||||||
|
"umac-128@openssh.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
ClientAliveCountMax 0
|
||||||
|
ClientAliveInterval 300
|
||||||
|
|
||||||
|
AllowAgentForwarding no
|
||||||
|
MaxAuthTries 3
|
||||||
|
MaxSessions 2
|
||||||
|
TCPKeepAlive no
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue