wamserma / flake-programs-sqlite

A simple flake to automagically specify programs.sqlite for command-not-found.
https://discourse.nixos.org/t/27669
MIT License
33 stars 0 forks source link

"command-not-found itself is not enabled" error prevents building #27

Open volkswagenfeature opened 1 month ago

volkswagenfeature commented 1 month ago

Adding flake-programs-sqlite on line 70 of my system config fails with the error message below. I am on NixOS 24.05, and using fish as my shell. What am I doing wrong?

error:
       … while calling the 'head' builtin

         at /nix/store/qszplw617r895nbcprgyj139c9a3r0xs-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/qszplw617r895nbcprgyj139c9a3r0xs-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error:
       Failed assertions:
       - Using programs.sqlite was requested but command-not-found itself is not enabled.
wamserma commented 1 month ago

I can see that you are also using nix-index - please check if you have programs.command-not-found.enable = false; (as suggested in the nix-index readme) in your config. If so, re-enable it as requested by the error message.