mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #93451 from edef1c/os-login
nixos/users-groups: don't consider a system with Google OS Login inaccessible
This commit is contained in:
commit
203f58ac1b
1 changed files with 4 additions and 2 deletions
|
@ -581,7 +581,7 @@ in {
|
||||||
# password or an SSH authorized key. Privileged accounts are
|
# password or an SSH authorized key. Privileged accounts are
|
||||||
# root and users in the wheel group.
|
# root and users in the wheel group.
|
||||||
assertion = !cfg.mutableUsers ->
|
assertion = !cfg.mutableUsers ->
|
||||||
any id (mapAttrsToList (name: cfg:
|
any id ((mapAttrsToList (name: cfg:
|
||||||
(name == "root"
|
(name == "root"
|
||||||
|| cfg.group == "wheel"
|
|| cfg.group == "wheel"
|
||||||
|| elem "wheel" cfg.extraGroups)
|
|| elem "wheel" cfg.extraGroups)
|
||||||
|
@ -591,7 +591,9 @@ in {
|
||||||
|| cfg.passwordFile != null
|
|| cfg.passwordFile != null
|
||||||
|| cfg.openssh.authorizedKeys.keys != []
|
|| cfg.openssh.authorizedKeys.keys != []
|
||||||
|| cfg.openssh.authorizedKeys.keyFiles != [])
|
|| cfg.openssh.authorizedKeys.keyFiles != [])
|
||||||
) cfg.users);
|
) cfg.users) ++ [
|
||||||
|
config.security.googleOsLogin.enable
|
||||||
|
]);
|
||||||
message = ''
|
message = ''
|
||||||
Neither the root account nor any wheel user has a password or SSH authorized key.
|
Neither the root account nor any wheel user has a password or SSH authorized key.
|
||||||
You must set one to prevent being locked out of your system.'';
|
You must set one to prevent being locked out of your system.'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue