summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorlouib <code@louib.net>2023-09-16 14:52:02 -0400
committerlouib <code@louib.net>2023-09-16 19:43:02 -0400
commit66100e22f6df5cf3d602c0a8a6f8529286932424 (patch)
tree3da04921cdf4303c22e3b5a29e81eb7853bf2ed7 /nixos/modules/virtualisation
parent982a9bcc79d338e3cd177c9d109dbac5b5569750 (diff)
downloadnixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.gz
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.bz2
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.lz
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.xz
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.zst
nixpkgs-66100e22f6df5cf3d602c0a8a6f8529286932424.zip
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.
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/google-compute-config.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/google-compute-config.nix b/nixos/modules/virtualisation/google-compute-config.nix
index cf94ce0faf3..3c503f027d7 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