Files
nixos-config/modules/home/firefox.nix

139 lines
4.0 KiB
Nix

{
config,
pkgs,
...
}:
{
# This gets around having to run `pywalfox install` manually, which just creates this manifest
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = builtins.toJSON {
name = "pywalfox";
description = "Automatically theme your browser using the colors generated by Pywal";
path = "${pkgs.pywalfox-native}/bin/pywalfox";
type = "stdio";
allowed_extensions = [ "pywalfox@frewacom.org" ];
};
programs.firefox = {
enable = true;
languagePacks = [ "en-US" ];
nativeMessagingHosts = with pkgs; [
pywalfox-native
];
policies = {
DefaultDownloadDirectory = config.xdg.userDirs.download;
DisableFirefoxAccounts = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = "never";
DontCheckDefaultBrowser = true;
EnableTrackingProtection = {
Value = true; # Tracking protection is enabled by default in both the regular browser and private browsing
Locked = true; # Whether or not a user can change tracking protection
Cryptomining = true; # Block cryptomining scripts
Fingerprinting = true; # Block fingerprinting scripts
EmailTracking = true; # Block email tracking pixels and scripts
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
Stories = false;
SponsoredPocket = false;
SponsoredStories = false;
Snippets = true;
Locked = true;
};
FirefoxSuggest = {
WebSuggestions = true;
SponsoredSuggestions = false;
ImproveSuggest = false;
Locked = true;
};
Homepage = {
URL = "http://100.78.212.35:30054";
Locked = true;
StartPage = "homepage";
};
OfferToSaveLogins = false;
OverrideFirstRunPage = "";
PasswordManagerEnabled = false;
PopupBlocking = {
Default = false;
Locked = true;
};
PrimaryPassword = false;
SearchBar = "unified";
ShowHomeButton = true;
SkipTermsOfUse = true;
};
profiles.eclypse = {
name = "Eclypse";
isDefault = true;
extensions = {
force = true;
packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
pywalfox
];
settings = {
"uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
};
};
};
search = {
default = "google";
force = true;
engines = {
nix-packages = {
name = "Nix Packages";
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
surugaya = {
name = "Surugaya";
urls = [
{
template = "https://www.suruga-ya.jp/search?search_word={searchTerms}";
}
];
iconMapObj."16" = "https://www.suruga-ya.jp/drupal/themes/surugaya/favicon.ico";
definedAliases = [ "@suru" ];
};
};
};
settings = {
# Auto-enable extensions
"extensions.autoDisableScopes" = 0;
};
};
};
}