How to configure Chromium?

I have set extraOpts, but i get errors when i start Chromium in terminal.

  programs.chromium = {
    enable = true;
    extensions = [
      "cbnipbdpgcncaghphljjicfgmkonflee" # Axel Springer Blocker
      "cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
      "hjdoplcnndgiblooccencgcggcoihigg" # Terms of Service; Didn’t Read
      "gcbommkclmclpchllfjekcdonpmejbdp" # HTTPS Everywhere
      "klbibkeccnjlkjkiokjodocebajanakg" # The Great Suspender
      "fngmhnnpilhplaeedifhccceomclgfbg" # EditThisCookie
      "oboonakemofpalcgghocfoadofidjkkk" # KeePassXC-Browser
      "fploionmjgeclbkemipmkogoaohcdbig" # Page load time
      "feeoiklfggbaibpdhkkngbpkppdmcjal" # Tab Counter
      "kglhbbefdnlheedjiejgomgmfplipfeb" # Jitsi Meetings
    ];
    extraOpts = {
      "BrowserSignin" = "0";
      "SyncDisabled" = "true";
      "PasswordManagerEnabled" = "false";
      "BuiltInDnsClientEnabled" = "false";
      "​DeviceMetricsReportingEnabled" = "true";
      "​ReportDeviceCrashReportInfo" = "true";
      "​SpellcheckEnabled" = "true";
      "​SpellcheckLanguage" = [
                               "de"
                               "en-US"
                             ];
      "​CloudPrintSubmitEnabled" = "false";
    };
  };

The created file looks OK.

/etc/chromium/policies/managed/extra.json

{"BrowserSignin":"0","BuiltInDnsClientEnabled":"false","PasswordManagerEnabled":"false","SyncDisabled":"true","​CloudPrintSubmitEnabled":"false","​DeviceMetricsReportingEnabled":"true","​ReportDeviceCrashReportInfo":"true","​SpellcheckEnabled":"true","​SpellcheckLanguage":["de","en-US"]}

but i get this errors:

[davidak@gaming:~]$ chromium
...
[38151:38151:0524/030817.625345:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​CloudPrintSubmitEnabled
[38151:38151:0524/030817.625380:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​DeviceMetricsReportingEnabled
[38151:38151:0524/030817.625392:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​ReportDeviceCrashReportInfo
[38151:38151:0524/030817.625404:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​SpellcheckEnabled
[38151:38151:0524/030817.625413:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​SpellcheckLanguage
[38151:38151:0524/030817.625770:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​CloudPrintSubmitEnabled
[38151:38151:0524/030817.625790:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​DeviceMetricsReportingEnabled
[38151:38151:0524/030817.625815:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​ReportDeviceCrashReportInfo
[38151:38151:0524/030817.625832:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​SpellcheckEnabled
[38151:38151:0524/030817.625857:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: ​SpellcheckLanguage

The option ​CloudPrintSubmitEnabled for example exists since version 17 and i have 81. The error message seems wrong, but i probably have to use a different syntax or something. Sadly the NixOS option has no example.

Directly after I posted this, I had the right idea.

  1. a boolean should actually be a boolean and not a string
  2. i copied the settings from the headings from the list website, but that contains invisible characters between the capitalized words (wtf)
  3. some settings are only supported on Chrome OS

The working config is now:

    extraOpts = {
      "BrowserSignin" = 0;
      "SyncDisabled" = true;
      "PasswordManagerEnabled" = false;
      "BuiltInDnsClientEnabled" = false;
      "MetricsReportingEnabled" = true;
      "SpellcheckEnabled" = true;
      "SpellcheckLanguage" = [
                               "de"
                               "en-US"
                             ];
      "CloudPrintSubmitEnabled" = false;
    };
2 Likes

Sorry to resurrect, but, how can you determine the valid options available to you?

disregard. I thought this was a home-manager option, I see it is reg nix cfg where i can see a link in the nixpkgs search options.

Thank you.