Chromium: Difference between revisions
add guide to enable manivest v2 support |
added a new section that describes how to change policies for the chromium browser through the configuration.nix file and also provided external links for further documentation and reference that cannot be provided here |
||
| Line 2: | Line 2: | ||
=== NixOS === | === NixOS === | ||
Add {{nixos:package|chromium}} to {{NixOS Manual|name=systemPackages|anchor=#sec-package-management}}. | Add {{nixos:package|chromium}} to {{NixOS Manual|name=systemPackages|anchor=#sec-package-management}}. | ||
== Updating browser policies == | |||
In Chromium the policy settings, which can be accessed by using {{Ic|chrome://policy}}, allow the user to change a lot of settings that dont exist anywhere else such as | |||
* Creating webapps when the browser is installed | |||
* Finding and downloading browser extensions automatically | |||
* Enabling or disabling the dinosaur game when the device is offline | |||
* Disable screenshots to be taken with browser extensions | |||
* Block all downloads from the browser (if you want to do that for some reason) | |||
* and hundreds more settings | |||
=== Natively Supported Policies === | |||
By default NixOS provides a few policies that can be enabled directly, a simple example is given below to understand how these are implemented<syntaxhighlight lang="nixos" line="1">programs.chromium = { | |||
enable = true; | |||
homepageLocation = "https://www.startpage.com/"; | |||
extensions = [ | |||
"eimadpbcbfnmbkopoojfekhnkhdbieeh;https://clients2.google.com/service/update2/crx" # dark reader | |||
"aapbdbdomjkkjkaonfhkkikfgjllcleb;https://clients2.google.com/service/update2/crx" # google translate | |||
]; | |||
extraOpts = { | |||
"WebAppInstallForceList" = [ | |||
{ | |||
"custom_name" = "Youtube"; | |||
"create_desktop_shortcut" = false; | |||
"default_launch_container" = "window"; | |||
"url" = "https://youtube.com"; | |||
} | |||
}; | |||
};</syntaxhighlight> | |||
* {{Ic|homepageLocation}} option allows you to set the site that the homepage will open on | |||
* {{Ic|extensions}} allows for the download of extensions directly in the browser through a simple list of the extension ID's that can be obtained from the [https://chromewebstore.google.com/ Chrome Web Store] by opening an extension page and copying the last part of the URL | |||
** In the example however there is another component, the download source from which the extensions will be downloaded | |||
** The URL provided in the list is the link that is used by google for managing, checking and updating extensions | |||
** So the method of just placing the extension ID can work like this: {{Ic|"fnpbehpgglbfnpimkachnpnecjncndgm"}} | |||
** But just in case that method does not automatically function the second method is shown above, where you place {{Ic|;}} and then the URL {{Ic|https //clients2.google.com/service/update2/crx}} to explicitly tell NixOS where to install the extension from | |||
* There are many more options that are natively supported and you can learn about them through {{Ic|man configuration.nix}} | |||
* But as shown above there is also an {{Ic|extraOpts}} option and that is used for policies that are not supported for direct setup, such as the policy to install web-apps | |||
=== Non-natively Supported Policies === | |||
As stated beforehand, there are hundreds of policies that are in chromium based browsers and not all of them can be supported directly and so the {{Ic|extraOpts}} option allows for the declaration of all the other policies | |||
There is no one place to find all the policies and some places you can find a "list" are given below: | |||
* A good number of commonly used policies are present and explained within {{Ic|man configuration.nix}} under {{Ic|programs.chromium}} | |||
* If you require a more comprehensive list then you can go to {{Ic|chrome://policy}} and click on the checkbox at the top of the page that says "Show policies with no value set", from there you can click on any of the policies to go to the documentation page for that policy to get details on how to use it | |||
* If you just want to see the list of all policies supported by chromium then you cant really do that, unfortunately google does not provide documentation on every single policy in the chromium browser base and if you wish to see the list of every single policy then you can do so by going directly to the source code and figuring out how a policy works | |||
* To see the most up-to-date file on all policies you can go [https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/pref_names.h here] | |||
== Accelerated video playback == | == Accelerated video playback == | ||