I was looking through the running processes on my laptop system and saw a bunch of speech synthesis daemon processes. From looking through the dependencies of my system with nix-store --query --tree /run/current-system, it looks like firefox has a dependency on speechd.
I found this line in the firefox expression, and I assume that is what pulls in speechd. But I don’t understand how this line is supposed to work. The setting speechSynthesisSupport is not found anywhere else in the nixpkgs repo. It is not possible to set it in the configuration. And even if it was, how is this expression cfg.speechSynthesisSupport or true suposed to work? Is it not going to return true always, or is there some kind of lazy eval magic going on?
Lots of questions. tl;dr: How do I get rid of speechd?
TL;DR: the or true means: If that attribute is not even set, use the value true.
It is indeed not very communicative how that general purpose config option of the import nixpkgs API doesn’t have a concept of default values set false. I think though, that the following should work in some contexts (at least in a NixOS flake setup):
Hmm, I think I understand what you are saying, but I never actually instantiate nixpkgs directly in my flake. I have something like this in the flake describing my system:
I didn’t realize override could be used like this.
Thanks! I was loosing my mind over this. I read this page of the manual multiple times, but my mind must have filtered that particular detail. I thought I was looking for a definition of a function named or. That actually exists in nixpkgs in libs.trivial.or, but it does logical or
Yeah .override overrides function args (for things that are overrideable, anyway) but I actually took this from the module code, since this override is what wrapperConfig is feeding into: