Chromium: Difference between revisions

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
Rrdpad (talk | contribs)
small fix
Line 14: Line 14:


=== Natively Supported Policies ===
=== 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 = {
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;
    enable = true;
homepageLocation = "https://www.startpage.com/";
    homepageLocation = "https://www.startpage.com/";
extensions = [
    extensions = [
"eimadpbcbfnmbkopoojfekhnkhdbieeh;https://clients2.google.com/service/update2/crx" # dark reader
      "eimadpbcbfnmbkopoojfekhnkhdbieeh;https://clients2.google.com/service/update2/crx" # dark reader
"aapbdbdomjkkjkaonfhkkikfgjllcleb;https://clients2.google.com/service/update2/crx" # google translate
      "aapbdbdomjkkjkaonfhkkikfgjllcleb;https://clients2.google.com/service/update2/crx" # google translate
];
    ];
extraOpts = {
    extraOpts = {
"WebAppInstallForceList" = [
      "WebAppInstallForceList" = [
{
        {
"custom_name" = "Youtube";
          "custom_name" = "Youtube";
"create_desktop_shortcut" = false;
          "create_desktop_shortcut" = false;
"default_launch_container" = "window";
          "default_launch_container" = "window";
"url" = "https://youtube.com";
          "url" = "https://youtube.com";
}
        }
};
      ];
};</syntaxhighlight>
    };
  };</syntaxhighlight>


* {{Ic|homepageLocation}} option allows you to set the site that the homepage will open on
* {{Ic|homepageLocation}} option allows you to set the site that the homepage will open on