ssh: Read host keys from data file; rename from openssh

This commit is contained in:
Katherina Walshe-Grey 2025-06-09 18:02:02 +01:00
parent d43962290d
commit 45831f553b
5 changed files with 30 additions and 30 deletions

21
common/ssh.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) concatMapAttrs;
keys = import ../keys.nix;
in
{
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
programs.ssh.knownHosts = concatMapAttrs
(host: key: {
"${host}.birdsong.network".publicKey = key;
})
keys.machines;
}