This commit is contained in:
kiri committed 2026-09-22 21:44:35 +02:00
1 parent f164d8b76e
commit 5748b3409b
60 files changed
+1346 -590

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
{ config, lib, ... }:
let
account = config.facts.account;
personalPublicKeys = map (machine: machine.sshKeys.personal.publicKey) (
lib.filter (machine: machine.sshKeys ? personal) (builtins.attrValues config.facts.machines)
);
in
{
flake.modules.nixos.sudo-ssh-agent-auth = {
security.pam = {
rssh.enable = true;
services.sudo.rssh = true;
};
};
flake.modules.nixos.openssh = {
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
AllowUsers = [ account.name ];
};
};
users.users.${account.name}.openssh.authorizedKeys.keys = personalPublicKeys;
};
}