feat: try rework

This commit is contained in:
Katharina Heidenreich 2026-04-04 11:42:19 +02:00
parent 1ddbd3b8b6
commit ecf10628c3
51 changed files with 1941 additions and 445 deletions

View file

@ -1,17 +1,15 @@
#{ config, pkgs, lib, ... }:
{ ... }:
let
ssh_data = import ../data/ssh.nix;
opensshConfig = import ../config/openssh.nix;
usersWithKeys = opensshConfig.ssh_users;
in {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
PermitRootLogin = "no";
AllowUsers = ssh_data.ssh_users;
AllowUsers = usersWithKeys;
};
};
users.users = builtins.mapAttrs (username: value: {
openssh.authorizedKeys.keys = ssh_data.keys.${username};
}) ssh_data.keys;
}