2025-01-31 09:22:38 +00:00
|
|
|
modulePath:
|
2025-03-18 22:58:00 -04:00
|
|
|
{ config, lib, pkgs, ... }:
|
2025-03-07 14:16:46 -06:00
|
|
|
|
2025-03-18 22:58:00 -04:00
|
|
|
let firefoxMockOverlay = import ../../setup-firefox-mock-overlay.nix modulePath;
|
2025-01-31 09:22:38 +00:00
|
|
|
in {
|
|
|
|
imports = [ firefoxMockOverlay ];
|
|
|
|
|
2025-03-07 14:16:46 -06:00
|
|
|
config = lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath {
|
2025-01-31 09:22:38 +00:00
|
|
|
enable = true;
|
|
|
|
profiles.extensions = {
|
2025-02-21 20:41:22 -08:00
|
|
|
extensions = {
|
|
|
|
force = true;
|
|
|
|
settings = {
|
|
|
|
"uBlock0@raymondhill.net".settings = {
|
|
|
|
selectedFilterLists = [
|
|
|
|
"ublock-filters"
|
|
|
|
"ublock-badware"
|
|
|
|
"ublock-privacy"
|
|
|
|
"ublock-unbreak"
|
|
|
|
"ublock-quick-fixes"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2025-01-31 09:22:38 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
} // {
|
2025-03-18 22:58:00 -04:00
|
|
|
nmt.script = let
|
|
|
|
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
|
|
|
|
profilePath = if isDarwin then
|
|
|
|
"Library/Application Support/Firefox/Profiles"
|
|
|
|
else
|
|
|
|
".mozilla/firefox";
|
|
|
|
in ''
|
2025-01-31 09:22:38 +00:00
|
|
|
assertFileContent \
|
2025-03-18 22:58:00 -04:00
|
|
|
"home-files/${profilePath}/extensions/browser-extension-data/uBlock0@raymondhill.net/storage.js" \
|
2025-01-31 09:22:38 +00:00
|
|
|
${./expected-storage.js}
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
}
|