This commit is contained in:
soraefir
2026-05-02 21:11:57 +02:00
parent d2e35d3673
commit 5aa041ba27

View File

@@ -10,9 +10,12 @@ in {
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.ports = [ 422 ]; services.openssh.ports = [ 422 ];
services.openssh.extraConfig = activeUsers;
users.users = lib.mapAttrs (name: userList: { users.users = lib.mapAttrs (name: userList: {
openssh.authorizedKeys.keys = lib.unique (map (u: u.pubssh) userList); openssh.authorizedKeys.keys = lib.unique (
}) activeUsers lib.concatMap (u: if u ? pubssh then [ u.pubssh ] else []) userList
);
}) groupedUsers
// { // {
root = {openssh.authorizedKeys.keys = [];}; root = {openssh.authorizedKeys.keys = [];};
}; };