Error when services.nscd.enableNsncd = true

The 22.11 release notes ask for help in testing nsncd as a replacement for nscd:

* `nsncd` is now available as a replacement of `nscd` . 

`nscd` is responsible for resolving hostnames, users and more in NixOS and has been a long standing source of bugs, such as sporadic network freezes. 

More context in this [issue]( 

Help us test the new implementation by setting `services.nscd.enableNsncd` to `true` . 

We plan to use `nsncd` by default in NixOS 23.05.

I’ve done that in my configuration.nix, but am getting an error during rebuild:

error: The option `services.nscd.enableNsncd' does not exist. Definition values:
       - In `/etc/nixos/configuration.nix': true

       … while evaluating the attribute ''

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:363:9:

          362|         options = checked options;
          363|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          364|         _module = checked (config._module);

I inserted that services.nscd.enableNsncd = true alongside other top level services.* directives. Any idea what might be going wrong?

This error occurs when I attempt to upgrade from 22.05 to 22.11. Do I need to have completed the upgrade first, and just be rebuilding a modified version of 22.11?

If you’re actually building 22.11 it should work, however if you’re not actually doing so and just think you are, this error would be expected. It doesn’t matter what you’re currently running on when you do the build.

1 Like

Yes looks like that was the problem, it’s building now and is way past the point where that error occurred. Thanks!