mirror of
https://github.com/nix-community/home-manager.git
synced 2025-04-13 15:57:47 +00:00
This change also removes checks for MOZ_APP_LAUNCHER set for wrapped package: the wrapped binary is in a different location on Darwin; but the check seems out of place for Home Manager since it doesn't control exact variables set by nixpkgs package. This change also removes handling of state version < 19.09 when the firefox package was not wrapped. It's time to clean up. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
39 lines
1 KiB
Nix
39 lines
1 KiB
Nix
modulePath:
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let firefoxMockOverlay = import ../../setup-firefox-mock-overlay.nix modulePath;
|
|
in {
|
|
imports = [ firefoxMockOverlay ];
|
|
|
|
config = lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath {
|
|
enable = true;
|
|
profiles.extensions = {
|
|
extensions = {
|
|
force = true;
|
|
settings = {
|
|
"uBlock0@raymondhill.net".settings = {
|
|
selectedFilterLists = [
|
|
"ublock-filters"
|
|
"ublock-badware"
|
|
"ublock-privacy"
|
|
"ublock-unbreak"
|
|
"ublock-quick-fixes"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
} // {
|
|
nmt.script = let
|
|
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
|
|
profilePath = if isDarwin then
|
|
"Library/Application Support/Firefox/Profiles"
|
|
else
|
|
".mozilla/firefox";
|
|
in ''
|
|
assertFileContent \
|
|
"home-files/${profilePath}/extensions/browser-extension-data/uBlock0@raymondhill.net/storage.js" \
|
|
${./expected-storage.js}
|
|
'';
|
|
});
|
|
}
|