75 lines
2.3 KiB
Nix
75 lines
2.3 KiB
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
policies = builtins.toJSON {
|
|
policies = {
|
|
DisableTelemetry = true;
|
|
DisableFirefoxStudies = true;
|
|
DisablePocket = true;
|
|
DisableFirefoxAccounts = true;
|
|
|
|
FirefoxHome = {
|
|
Search = true;
|
|
TopSites = true;
|
|
SponsoredTopSites = false;
|
|
Highlights = false;
|
|
Pocket = false;
|
|
SponsoredPocket = false;
|
|
};
|
|
|
|
SanitizeOnShutdown = {
|
|
Cache = true;
|
|
Cookies = false;
|
|
History = false;
|
|
Sessions = true;
|
|
SiteSettings = false;
|
|
OfflineApps = true;
|
|
};
|
|
|
|
ExtensionSettings = {
|
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
"floccus@handmadeideas.org" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
"uBlock0@raymondhill.net" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
"{15cb5e64-94bd-41aa-91cf-751bb1a84972}" = {
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-macchiato-lavender2/latest.xpi";
|
|
installation_mode = "force_installed";
|
|
};
|
|
};
|
|
|
|
Preferences = {
|
|
"browser.startup.homepage" = "about:home";
|
|
"extensions.autoDisableScopes" = 0;
|
|
"browser.toolbars.bookmarks.visibility" = "always";
|
|
"network.cookie.cookieBehavior" = 1;
|
|
"privacy.clearOnShutdown.cookies" = false;
|
|
"privacy.clearOnShutdown.history" = false;
|
|
"sidebar.revamp" = true;
|
|
"sidebar.verticalTabs" = true;
|
|
"sidebar.main.tools" = "bookmarks,history,tabs";
|
|
"sidebar.visibility" = "always";
|
|
};
|
|
};
|
|
};
|
|
|
|
policiesFile = pkgs.writeText "librewolf-policies.json" policies;
|
|
in
|
|
{
|
|
system.activationScripts.postActivation.text = ''
|
|
DIST_DIR="/Applications/LibreWolf.app/Contents/Resources/distribution"
|
|
if [ -d "/Applications/LibreWolf.app" ]; then
|
|
mkdir -p "$DIST_DIR"
|
|
cp ${policiesFile} "$DIST_DIR/policies.json"
|
|
chmod 644 "$DIST_DIR/policies.json"
|
|
fi
|
|
'';
|
|
}
|