···379379 # Update the start menu for each user that is currently logged in
380380 system.userActivationScripts.plasmaSetup = activationScript;
381381382382- programs.firefox.wrapperConfig.enablePlasmaBrowserIntegration = true;
382382+ programs.firefox.nativeMessagingHosts.packages = [ pkgs.plasma5Packages.plasma-browser-integration ];
383383 })
384384385385 (mkIf (cfg.kwinrc != {}) {
+14-16
nixos/tests/firefox.nix
···11import ./make-test-python.nix ({ pkgs, firefoxPackage, ... }:
22-let firefoxPackage' = firefoxPackage.override (args: {
33- extraPrefsFiles = (args.extraPrefsFiles or []) ++ [
44- # make sure that autoplay is enabled by default for the audio test
55- (builtins.toString (builtins.toFile "autoplay-pref.js" ''defaultPref("media.autoplay.default",0);''))
66- ];
77- });
22+{
33+ name = firefoxPackage.pname;
8499-in
1010-{
1111- name = firefoxPackage'.unwrapped.pname;
125 meta = with pkgs.lib.maintainers; {
136 maintainers = [ eelco shlevy ];
147 };
···1710 { pkgs, ... }:
18111912 { imports = [ ./common/x11.nix ];
2020- environment.systemPackages = [
2121- firefoxPackage'
2222- pkgs.xdotool
2323- ];
1313+ environment.systemPackages = [ pkgs.xdotool ];
1414+1515+ programs.firefox = {
1616+ enable = true;
1717+ preferences."media.autoplay.default" = 0;
1818+ package = firefoxPackage;
1919+ };
24202521 # Create a virtual sound device, with mixing
2622 # and all, for recording audio.
···58545955 };
60566161- testScript = ''
5757+ testScript = let
5858+ exe = firefoxPackage.unwrapped.binaryName;
5959+ in ''
6260 from contextlib import contextmanager
63616462···97959896 with subtest("Wait until Firefox has finished loading the Valgrind docs page"):
9997 machine.execute(
100100- "xterm -e '${firefoxPackage'.unwrapped.binaryName} file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &"
9898+ "xterm -e '${exe} file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &"
10199 )
102100 machine.wait_for_window("Valgrind")
103101 machine.sleep(40)
···105103 with subtest("Check whether Firefox can play sound"):
106104 with record_audio(machine):
107105 machine.succeed(
108108- "${firefoxPackage'.unwrapped.binaryName} file://${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/phone-incoming-call.oga >&2 &"
106106+ "${exe} file://${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/phone-incoming-call.oga >&2 &"
109107 )
110108 wait_for_sound(machine)
111109 machine.copy_from_vm("/tmp/record.wav")