From 66100e22f6df5cf3d602c0a8a6f8529286932424 Mon Sep 17 00:00:00 2001 From: louib Date: Sat, 16 Sep 2023 14:52:02 -0400 Subject: nixos/virtualisation: allow configuring openssh root login on GCE This commit makes the OpenSSH option `PermitRootLogin` available to be configured by other NixOS modules when using the Google Cloud Engine (GCE) NixOS image builder. Other options like `PasswordAuthentication` were already configurable, so I think it makes sense to make `PermitRootLogin` configurable as well is order to disable it completely, for example. --- nixos/modules/virtualisation/google-compute-config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/virtualisation') diff --git a/nixos/modules/virtualisation/google-compute-config.nix b/nixos/modules/virtualisation/google-compute-config.nix index cf94ce0faf36..3c503f027d79 100644 --- a/nixos/modules/virtualisation/google-compute-config.nix +++ b/nixos/modules/virtualisation/google-compute-config.nix @@ -39,7 +39,7 @@ in # Allow root logins only using SSH keys # and disable password authentication in general services.openssh.enable = true; - services.openssh.settings.PermitRootLogin = "prohibit-password"; + services.openssh.settings.PermitRootLogin = mkDefault "prohibit-password"; services.openssh.settings.PasswordAuthentication = mkDefault false; # enable OS Login. This also requires setting enable-oslogin=TRUE metadata on -- cgit 1.4.1