Previously when the company-nixos-options company backend was enabled, other backends for other modes were not getting a chance to run because this backend never returned nil to the 'prefix' command. This caused this completion to be the only one that ever fired regardless of mode. The below change checks whether we are in a mode called 'nix-mode' or whether the file extension is .nix and if neither is true, passes control to the next backend. This should fix the issue.
Previously when the company-nixos-options company backend was enabled, other backends for other modes were not getting a chance to run because this backend never returned nil to the 'prefix' command. This caused this completion to be the only one that ever fired regardless of mode. The below change checks whether we are in a mode called 'nix-mode' or whether the file extension is .nix and if neither is true, passes control to the next backend. This should fix the issue.