183 lines
4.7 KiB
Nix
183 lines
4.7 KiB
Nix
{ lib, pkgs, ... }:
|
|
{
|
|
programs.firefox = {
|
|
enable = true;
|
|
|
|
profiles.default = {
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
ublock-origin
|
|
private-relay
|
|
yomitan
|
|
|
|
reddit-enhancement-suite
|
|
enhancer-for-youtube
|
|
qr-code-address-bar
|
|
];
|
|
|
|
settings = {
|
|
"browser.newtabpage.pinned" = [
|
|
{
|
|
label = "Arch Wiki";
|
|
url = "https://wiki.archlinux.org";
|
|
}
|
|
{
|
|
label = "Translate";
|
|
url = "https://mozhi.pussthecat.org";
|
|
}
|
|
{
|
|
label = "ChatGPT";
|
|
url = "https://chatgpt.com";
|
|
}
|
|
{
|
|
label = "YouTube";
|
|
url = "https://youtube.com";
|
|
}
|
|
{
|
|
label = "Reddit";
|
|
url = "https://old.reddit.com";
|
|
}
|
|
{
|
|
label = "4chan";
|
|
url = "https://www.4chan.org/frames";
|
|
}
|
|
];
|
|
|
|
"browser.aboutConfig.showWarning" = false;
|
|
"browser.translations.automaticallyPopup" = false;
|
|
"browser.tabs.inTitlebar" = 0;
|
|
|
|
"devtools.accessibility.enabled" = false;
|
|
"browser.eme.ui.enabled" = false;
|
|
|
|
"services.sync.engine.addons" = false;
|
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
"extensions.autoDisableScopes" = 0;
|
|
};
|
|
|
|
search = {
|
|
force = true;
|
|
default = "ddg";
|
|
|
|
engines =
|
|
let
|
|
makeShortcuts =
|
|
let
|
|
prefix = "@";
|
|
in
|
|
map (shortcut: prefix + shortcut);
|
|
|
|
hideEngines =
|
|
let
|
|
hideEngine = engine: {
|
|
name = engine;
|
|
value = {
|
|
metaData.hidden = true;
|
|
};
|
|
};
|
|
in
|
|
engines: lib.listToAttrs (map hideEngine engines);
|
|
in
|
|
(hideEngines [
|
|
"google"
|
|
"bing"
|
|
"amazondotcom-us"
|
|
"ebay"
|
|
])
|
|
// {
|
|
"Arch Wiki" = {
|
|
urls = [ { template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } ];
|
|
icon = "https://wiki.archlinux.org/favicon.ico";
|
|
definedAliases = makeShortcuts [
|
|
"archlinux"
|
|
"aw"
|
|
];
|
|
};
|
|
|
|
"Nix Packages" = {
|
|
urls = [
|
|
{
|
|
template = "https://search.nixos.org/packages";
|
|
params = [
|
|
{
|
|
name = "type";
|
|
value = "packages";
|
|
}
|
|
{
|
|
name = "channel";
|
|
value = "unstable";
|
|
}
|
|
{
|
|
name = "query";
|
|
value = "{searchTerms}";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
|
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
definedAliases = makeShortcuts [
|
|
"nixpkgs"
|
|
"packages"
|
|
"np"
|
|
];
|
|
};
|
|
|
|
"NixOS Wiki" = {
|
|
urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ];
|
|
icon = "https://wiki.nixos.org/favicon.png";
|
|
definedAliases = makeShortcuts [
|
|
"nixos"
|
|
"nw"
|
|
];
|
|
};
|
|
|
|
"MyNixOS" = {
|
|
urls = [ { template = "https://mynixos.com/search?q={searchTerms}"; } ];
|
|
icon = "https://mynixos.com/favicon-light.svg";
|
|
definedAliases = makeShortcuts [
|
|
"mynixos"
|
|
"mw"
|
|
];
|
|
};
|
|
|
|
"RuTracker" = {
|
|
urls = [ { template = "https://rutracker.org/forum/tracker.php?nm={searchTerms}"; } ];
|
|
icon = "https://rutracker.org/favicon.ico";
|
|
definedAliases = makeShortcuts [
|
|
"rutracker"
|
|
"rt"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
policies = {
|
|
DontCheckDefaultBrowser = true;
|
|
DisableFirefoxStudies = true;
|
|
DisableTelemetry = true;
|
|
DisablePocket = true;
|
|
|
|
EnableTrackingProtection = {
|
|
Value = true;
|
|
Locked = false;
|
|
|
|
Cryptomining = true;
|
|
EmailTracking = true;
|
|
Fingerprinting = true;
|
|
|
|
Exceptions = [ ];
|
|
};
|
|
|
|
FirefoxHome = {
|
|
SponsoredTopSites = false;
|
|
SponsoredPocket = false;
|
|
Pocket = false;
|
|
};
|
|
|
|
StartDownloadsInTempDirectory = true;
|
|
};
|
|
};
|
|
}
|