dedupe ssh config

This commit is contained in:
Henry Hiles 2026-11-09 20:47:55 -05:00
commit 01cc32ee50
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

17
modules/common/ssh.nix Normal file
View file

@ -0,0 +1,17 @@
{ 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";
};
};
};
}