feat: try rework
This commit is contained in:
parent
1ddbd3b8b6
commit
ecf10628c3
51 changed files with 1941 additions and 445 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue