`programs.chromium.extraOpts` does not exist

Hello. I’m a new user of NixOS and was baffled that my first problem with Nix would be something like this. extensions work but extraOpts does not.

Welcome to NixOS!

I’m not sure I understand the problem. What are the relevant lines in your config and which error do you get? Is it a typo, maybe? Check search.nixos.org for an example on how to use the option “programs.chromium.extraOpts”.

I don’t use Chromium, but you would have to do something like

programs.chromium = {
  enable = true;
  extensions = [
    # list your extensions here
  extraOpts = {
    # add options here

Initial error after I modify the home.nix file is:
error: The option `programs.chromium.extraOpts' does not exist.

I’d need a way to check what nix file it pulled as it seem that chromium.nix in nixpkgs-unstable has that option available, as well as search.nixos.org. Even when I updated the flake.lock file, it still gives an error . I even tried it with google chrome, but it gave me the same error (not sure with brave, but probably also doesn’t work also since they are all generated from the same chromium.nix file).

Edit: I tried playing around other programs.chromium options and only enable and extensions seem to work properly. All other options give the same error when home.nix is evaluated.

I think I have the answer.

home-manager does not have the option programs.chromium.extraOpts, however, it exists in NixOS options.

Now, I’m trying to find a way to use NixOS options inside home-manager.

In your initial post, you didn’t clarify that you are using Home Manager.

That is correct. NixOS and Home Manager each provide their own list of options. To check which options are available in Home Manager for Chromium check the relevant section of the Home Manager Manual.

I’ve been annoyed a few times by these differences. I use both NixOS and nix on fedora, while I can always manage my settings via HM on the NixOS machine, the other way can be painful.

I’d recommend Home Manager - Option Search for a “search.nixos.org”-like experience for HM.

And while you didn’t state why you need extraOpts, be prepared to face some limitations when trying to have a fully declarative browser config.

Yeah, I thought that search.nixos.org’s options tab was the same as home-manager’s.

I just wanted to be able to sign in to the browser, as I have tabs I need to sync.