Merge pull request #118387 from raboof/document-how-to-disable-nss

Improved error message on disabling NSS modules when disabling nscd
This commit is contained in:
Sandro 2022-04-16 22:55:40 +02:00 committed by GitHub
commit 6df0dae4f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,11 +95,14 @@ with lib;
config = {
assertions = [
{
# Prevent users from disabling nscd, with nssModules being set.
# If disabling nscd is really necessary, it's still possible to opt out
# by forcing config.system.nssModules to [].
assertion = config.system.nssModules.path != "" -> config.services.nscd.enable;
message = "Loading NSS modules from system.nssModules (${config.system.nssModules.path}), requires services.nscd.enable being set to true.";
message = ''
Loading NSS modules from system.nssModules (${config.system.nssModules.path}),
requires services.nscd.enable being set to true.
If disabling nscd is really necessary, it is possible to disable loading NSS modules
by setting `system.nssModules = lib.mkForce [];` in your configuration.nix.
'';
}
];