Add module to configure sshd
This commit is contained in:
parent
14e269c02c
commit
59b58faeb5
4 changed files with 50 additions and 5 deletions
27
nixos/ssh.nix
Normal file
27
nixos/ssh.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{lib, ...}: {
|
||||
options = {
|
||||
pim.ssh.keys = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.listOf lib.types.str);
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
pim.ssh.keys = {
|
||||
pim = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim"];
|
||||
niels = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"];
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {
|
||||
openFirewall = true;
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
GSSAPIAuthentication = false;
|
||||
UseDns = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue