Chromium: Difference between revisions

imported>Pogobanane
mention new way to enable wayland
Sdht0 (talk | contribs)
Remove outdated code about googletalk and flash
Line 1: Line 1:
'''Note''': Firefox requires the Google Hangouts Video plugin but Chromium (37+) doesn't require any plugin to use Google Hangouts.
== Per User ==
It is possible to configure certain features in nixpkgs by creating <code>~/.nixpkgs/config.nix</code> and setting the options. See below for details on how to set the equivalent options for the system profile when running NixOS.
To install Firefox and Chromium for a user profile you need to create <code>~/.nixpkgs/config.nix</code> and add the following options:
~/.nixpkgs/config.nix:
<syntaxhighlight lang="nix">
{
    allowUnfree = true;
    firefox = {
    enableGoogleTalkPlugin = true;
    };
    chromium = {
    enablePepperFlash = true; # Chromium's non-NSAPI alternative to Adobe Flash
    };
}
</syntaxhighlight>
After these options have been set you need to install the "Wrapper" versions of Firefox:
<syntaxhighlight lang="console">
$ nix-env -i firefox-with-plugins chromium
</syntaxhighlight>
If you are using a version that does not have a wrapper, you can write one (add to config.nix and install with `nix-env -iA nixpkgs.pkgs.firefox-bin-wrapper` or `nix-env -iA nixos.pkgs.firefox-bin-wrapper`):
<syntaxhighlight lang="nix">
  packageOverrides = pkgs: with pkgs; rec {
    # FF bin with plugins
    firefox-bin-wrapper = wrapFirefox { browser = firefox-bin; };
  };
</syntaxhighlight>
== For NixOS ==
In NixOS you can configure nixpkgs options by adding a nixpkgs.config section to /etc/nixos/configuration.nix. This has no effect on nix-env commands but does apply to packages installed via the environment.systemPackages list. The options are exactly the same as above.
In order to install Firefox with support for plugins, you need to use the "Wrapper" version. For example, in /etc/nixos/configuration.nix environment.systemPackages this would be firefoxWrapper.
To install Firefox and Chromium with Google Talk and Flash in your system profile you can add the following to your configuration.nix file.
/etc/nixos/configuration.nix:
<syntaxhighlight lang="nix">
...
nixpkgs.config = {
    allowUnfree = true;
    firefox = {
    enableGoogleTalkPlugin = true;
    enableAdobeFlash = true;
    };
    chromium = {
    enablePepperFlash = true; # Chromium removed support for Mozilla (NPAPI) plugins so Adobe Flash no longer works
    };
  };
environment.systemPackages = [ pkgs.firefoxWrapper pkgs.chromium ];
...
</syntaxhighlight>
then run <pre>nixos-rebuild switch</pre>
== Enable GPU accelerated video decoding (VA-API) ==  
== Enable GPU accelerated video decoding (VA-API) ==