additional options needed to build aws image

This commit is contained in:
Noah Masur
2022-09-20 12:50:04 +00:00
parent 9e3345ff9b
commit 720a3cc409
2 changed files with 22 additions and 7 deletions

View File

@ -5,6 +5,11 @@
type = lib.types.str;
description = "Public SSH key authorized for this system.";
};
permitRootLogin = lib.mkOption {
type = lib.types.str;
description = "Root login settings.";
default = "no";
};
};
config = {
@ -15,10 +20,11 @@
gatewayPorts = "no";
forwardX11 = false;
allowSFTP = true;
permitRootLogin = "no";
permitRootLogin = config.permitRootLogin;
};
users.users.${config.user}.authorizedKeys.keys = [ config.publicKey ];
users.users.${config.user}.openssh.authorizedKeys.keys =
[ config.publicKey ];
};
}