Skip to content

Commit

Permalink
feat(firefox): Install extensions declaratively using Policies
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Jun 11, 2024
1 parent e368a10 commit de2ad0a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 32 deletions.
42 changes: 21 additions & 21 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
# release notes.
stateVersion = "22.11";
packages = with pkgs;
[ obsidian mdbook spotify gnumake ] ++ lib.lists.optionals isDarwin [
[
# obsidian # re-enable when the nixpkgs package is fixed
mdbook
spotify
gnumake
] ++ lib.lists.optionals isDarwin [
# put macOS specific packages here
# xcodes
] ++ lib.lists.optionals isLinux [
Expand Down
57 changes: 47 additions & 10 deletions home-manager/modules/arkenfox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,56 @@
policies = {
DisableTelemetry = true;
DisablePocket = true;

DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisableFirefoxAccounts = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DisplayBookmarksToolbar = "always";
SearchBar = "unified";
ExtensionSettings = {
# uBlock Origin:
"[email protected]" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
default_area = "navbar";
};
# 1Password
"{d634138d-c276-4fc8-924b-40a0ea21d284}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi";
installation_mode = "force_installed";
default_area = "navbar";
};
# xBrowserSync
"{019b606a-6f61-4d01-af2a-cea528f606da}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/xbs/latest.xpi";
installation_mode = "force_installed";
};
# Tokyonight theme
"{4520dc08-80f4-4b2e-982a-c17af42e5e4d}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/tokyo-night-milav/latest.xpi";
};
# Disable built-in search engines
"[email protected]" = { installation_mode = "blocked"; };
"bing.mozilla.org" = { installation_mode = "blocked"; };
"ddg.mozilla.org" = { installation_mode = "blocked"; };
"ebay.mozilla.org" = { installation_mode = "blocked"; };
"google.mozilla.org" = { installation_mode = "blocked"; };
};
};
profiles.Default = {
isDefault = true;
# tokyonight theme from extension above
settings.activeThemeID = "{4520dc08-80f4-4b2e-982a-c17af42e5e4d}";
search = {
default = "Kagi";
force = true;
Expand All @@ -37,15 +83,6 @@
"Wikipedia (en)".metaData.hidden = true;
};
};
settings = {
# disable Pocket shit
"extensions.pocket.enabled" = false;
"extensions.pocket.api" = "";
"extensions.pocket.bffApi" = "";
"browser.urlbar.suggest.pocket" = false;
# always show bookmarks toolbar
"browser.toolbars.bookmarks.visibility" = "always";
};
arkenfox = {
enable = isLinux;
"0000".enable = true;
Expand Down

0 comments on commit de2ad0a

Please sign in to comment.