Jump to content

Chromium: Difference between revisions

m
no edit summary
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 21: Line 21:
}
}
</nowiki>}}
</nowiki>}}
== Gnome Shell extensions ==
Gnome Shell extensions can be enabled with <code>enableGnomeExtensions = true</code>. It is a mozilla plugin, therefore it does not work currently with Chromium.


== Enabling native Wayland support ==
== Enabling native Wayland support ==


Since Nixos 22.05 you can turn on native wayland support in all chrome and most electron apps by setting an environment variable: <code>environment.sessionVariables.NIXOS_OZONE_WL = "1"</code> ([https://nixos.org/manual/nixos/unstable/release-notes.html#sec-release-22.05-notable-changes see notable changes])
You can turn on native Wayland support in all chrome and most electron apps by setting an environment variable: <code>environment.sessionVariables.NIXOS_OZONE_WL = "1"</code>.
 
In earlier versions you can enable wayland support by setting the appropriate command-line flags:
 
<syntaxhighlight lang="nix">
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
</syntaxhighlight>
 
== Overriding Chromium ==
 
Note: This section was never properly tested. Please update it accordingly if you notice issues with the examples and feel free to extend it.
 
To create a customized Chromium the following approach can be used:
<pre>
chromium.mkDerivation (base: { name = "my-chromium"; gnFlags = { test_flag = 42; }; })
</pre>


It should also be possible to override a Chromium attribute using <pre>chromium.browser.overrideAttrs ...</pre>.
== Enabling DRM (Widevine support) ==
By default, {{nixos:package|chromium}} does not support playing DRM protected media. However, there is a build time flag to include the unfree Widevine blob from nixpkgs:
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{
  environment.systemPackages = with pkgs; [
    (chromium.override { enableWideVine = true; })
  ];
}
</nowiki>}}


[[Category:Applications]]
[[Category:Applications]]
trusted
602

edits