Fix ssh
This commit is contained in:
@@ -7,8 +7,15 @@ let
|
|||||||
in {
|
in {
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh = {
|
||||||
services.openssh.ports = [ 422 ];
|
enable = true;
|
||||||
|
ports = [ 422 ];
|
||||||
|
banner = "";
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "prohibit-password";
|
||||||
|
};
|
||||||
|
};
|
||||||
users.users = lib.mapAttrs (name: userList: {
|
users.users = lib.mapAttrs (name: userList: {
|
||||||
openssh.authorizedKeys.keys = lib.unique (
|
openssh.authorizedKeys.keys = lib.unique (
|
||||||
lib.concatMap (u: if u ? pubssh then [ u.pubssh ] else []) userList
|
lib.concatMap (u: if u ? pubssh then [ u.pubssh ] else []) userList
|
||||||
|
|||||||
Reference in New Issue
Block a user