firefox: use wrapped package

This makes the

    programs.firefox.package

option take a pre-wrapped Firefox package as value if state version is
set to "19.09" or later. This should make the Firefox module work with
a wider range of Firefox packages.
This commit is contained in:
Robert Helgesson 2019-08-18 10:57:30 +02:00
parent c2429ca0cf
commit 73641e492c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
7 changed files with 99 additions and 12 deletions

View file

@ -0,0 +1,4 @@
{
firefox-profile-settings = ./profile-settings.nix;
firefox-state-version-19_09 = ./state-version-19_09.nix;
}

View file

@ -0,0 +1,6 @@
// Generated by Home Manager.
user_pref("general.smoothScroll", false);

View file

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.firefox = {
enable = true;
profiles.test.settings = {
"general.smoothScroll" = false;
};
};
nmt.script = ''
assertFileRegex \
home-path/bin/firefox \
MOZ_APP_LAUNCHER
assertFileContent \
home-files/.mozilla/firefox/test/user.js \
${./profile-settings-expected-user.js}
'';
};
}

View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
with lib;
{
config = {
home.stateVersion = "19.09";
programs.firefox.enable = true;
nmt.script = ''
assertFileRegex \
home-path/bin/firefox \
MOZ_APP_LAUNCHER
'';
};
}