nixos/modules/common/ssh.nix
2026-11-09 20:47:55 -05:00

17 lines
487 B
Nix

{ config, lib, ... }:
{
options.quad.ssh.enable = lib.mkEnableOption "the SSH server, with key-only login as quadradical";
config = lib.mkIf config.quad.ssh.enable {
users.users.quadradical.openssh.authorizedKeys.keys = import ../../secrets/keys.nix;
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
AllowUsers = [ "quadradical" ];
PermitRootLogin = "no";
};
};
};
}