Initial dendritic rewrite
This commit is contained in:
161
modules/features/firefox.nix
Normal file
161
modules/features/firefox.nix
Normal file
@@ -0,0 +1,161 @@
|
||||
{
|
||||
flake.modules.homeManager.firefox =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# 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 = lib.getExe' pkgs.pywalfox-native "pywalfox";
|
||||
# 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;
|
||||
# For a list of available packaged extensions, see:
|
||||
# https://github.com/nix-community/nur-combined/blob/main/repos/rycee/pkgs/firefox-addons/addons.json
|
||||
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" ];
|
||||
};
|
||||
home-manager = {
|
||||
name = "Home Manager";
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@hm" ];
|
||||
};
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user