2024-10-07 17:06:52 -04:00
|
|
|
modulePath:
|
2025-03-07 14:16:46 -06:00
|
|
|
{ config, lib, ... }:
|
2024-10-07 17:06:52 -04:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2025-03-07 14:16:46 -06:00
|
|
|
cfg = lib.getAttrFromPath modulePath config;
|
2024-10-07 17:06:52 -04:00
|
|
|
|
|
|
|
firefoxMockOverlay = import ../../setup-firefox-mock-overlay.nix modulePath;
|
|
|
|
|
|
|
|
in {
|
|
|
|
imports = [ firefoxMockOverlay ];
|
|
|
|
|
2025-03-07 14:16:46 -06:00
|
|
|
config = lib.mkIf config.test.enableBig (lib.setAttrByPath modulePath {
|
2024-10-07 17:06:52 -04:00
|
|
|
enable = true;
|
|
|
|
profiles = {
|
|
|
|
basic.isDefault = true;
|
|
|
|
test = {
|
|
|
|
id = 1;
|
|
|
|
settings = {
|
|
|
|
"general.smoothScroll" = false;
|
|
|
|
"browser.newtabpage.pinned" = [{
|
|
|
|
title = "NixOS";
|
|
|
|
url = "https://nixos.org";
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} // {
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileRegex \
|
|
|
|
home-path/bin/${cfg.wrappedPackageName} \
|
|
|
|
MOZ_APP_LAUNCHER
|
|
|
|
|
|
|
|
assertDirectoryExists home-files/${cfg.configPath}/basic
|
|
|
|
|
|
|
|
assertFileContent \
|
|
|
|
home-files/${cfg.configPath}/test/user.js \
|
|
|
|
${./expected-user.js}
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
}
|