diff options
author | louib <code@louib.net> | 2023-09-16 14:52:02 -0400 |
---|---|---|
committer | louib <code@louib.net> | 2023-09-16 19:43:02 -0400 |
commit | 66100e22f6df5cf3d602c0a8a6f8529286932424 (patch) | |
tree | 3da04921cdf4303c22e3b5a29e81eb7853bf2ed7 /nixos | |
parent | 982a9bcc79d338e3cd177c9d109dbac5b5569750 (diff) | |
download | nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.gz nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.bz2 nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.lz nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.xz nixlib-66100e22f6df5cf3d602c0a8a6f8529286932424.tar.zst nixlib-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')
-rw-r--r-- | nixos/modules/virtualisation/google-compute-config.nix | 2 |
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 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 |