mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add Kagi and more secure policies to firefox
This commit is contained in:
parent
8d60d65c38
commit
af4e78fe8b
2 changed files with 474 additions and 102 deletions
|
|
@ -8091,29 +8091,157 @@ Also, I setup some search aliases for functions I often use, such as NixOS optio
|
||||||
I used to build the firefox addon =bypass-paywalls-clean= myself here, but the maintainer always deletes old packages, and it became a chore for me to maintain here, so I no longer do that.
|
I used to build the firefox addon =bypass-paywalls-clean= myself here, but the maintainer always deletes old packages, and it became a chore for me to maintain here, so I no longer do that.
|
||||||
|
|
||||||
#+begin_src nix :tangle profiles/common/home/firefox.nix
|
#+begin_src nix :tangle profiles/common/home/firefox.nix
|
||||||
{ pkgs, ... }:
|
{ self, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
lock-false = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
lock-true = {
|
||||||
|
Value = true;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox; # uses overrides
|
package = pkgs.firefox; # uses overrides
|
||||||
policies = {
|
policies = {
|
||||||
# CaptivePortal = false;
|
# CaptivePortal = false;
|
||||||
|
AppAutoUpdate = false;
|
||||||
|
BackgroundAppUpdate = false;
|
||||||
|
DisableBuiltinPDFViewer = true;
|
||||||
DisableFirefoxStudies = true;
|
DisableFirefoxStudies = true;
|
||||||
DisablePocket = true;
|
DisablePocket = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
DisableTelemetry = true;
|
DisableTelemetry = true;
|
||||||
DisableFirefoxAccounts = false;
|
DisableFirefoxAccounts = false;
|
||||||
|
DisableProfileImport = true;
|
||||||
|
DisableProfileRefresh = true;
|
||||||
DisplayBookmarksToolbar = "always";
|
DisplayBookmarksToolbar = "always";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
NoDefaultBookmarks = true;
|
NoDefaultBookmarks = true;
|
||||||
OfferToSaveLogins = false;
|
OfferToSaveLogins = false;
|
||||||
OfferToSaveLoginsDefault = false;
|
OfferToSaveLoginsDefault = false;
|
||||||
EnableTrackingProtection = true;
|
PasswordManagerEnabled = false;
|
||||||
|
DisableMasterPasswordCreation = true;
|
||||||
|
ExtensionUpdate = false;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
EmailTracking = true;
|
||||||
|
# Exceptions = ["https://example.com"]
|
||||||
|
};
|
||||||
|
PDFjs = {
|
||||||
|
Enabled = false;
|
||||||
|
EnablePermissions = false;
|
||||||
|
};
|
||||||
|
Handlers = {
|
||||||
|
mimeTypes."application/pdf".action = "saveToDisk";
|
||||||
|
};
|
||||||
|
extensions = {
|
||||||
|
pdf = {
|
||||||
|
action = "useHelperApp";
|
||||||
|
ask = true;
|
||||||
|
handlers = [
|
||||||
|
{
|
||||||
|
name = "GNOME Document Viewer";
|
||||||
|
path = "${pkgs.evince}/bin/evince";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = true;
|
||||||
|
TopSites = true;
|
||||||
|
SponsoredTopSites = false;
|
||||||
|
Highlights = true;
|
||||||
|
Pocket = false;
|
||||||
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = false;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SanitizeOnShutdown = {
|
||||||
|
Cache = true;
|
||||||
|
Cookies = false;
|
||||||
|
Downloads = true;
|
||||||
|
FormData = true;
|
||||||
|
History = false;
|
||||||
|
Sessions = false;
|
||||||
|
SiteSettings = false;
|
||||||
|
OfflineApps = true;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SearchEngines = {
|
||||||
|
PreventInstalls = true;
|
||||||
|
Remove = [
|
||||||
|
"Bing" # Fuck you
|
||||||
|
];
|
||||||
|
};
|
||||||
|
UserMessaging = {
|
||||||
|
ExtensionRecommendations = false; # Don’t recommend extensions while the user is visiting web pages
|
||||||
|
FeatureRecommendations = false; # Don’t recommend browser features
|
||||||
|
Locked = true; # Prevent the user from changing user messaging preferences
|
||||||
|
MoreFromMozilla = false; # Don’t show the “More from Mozilla” section in Preferences
|
||||||
|
SkipOnboarding = true; # Don’t show onboarding messages on the new tab page
|
||||||
|
UrlbarInterventions = false; # Don’t offer suggestions in the URL bar
|
||||||
|
WhatsNew = false; # Remove the “What’s New” icon and menuitem
|
||||||
|
};
|
||||||
|
ExtensionSettings = {
|
||||||
|
"3rdparty".Extensions = {
|
||||||
|
# https://github.com/gorhill/uBlock/blob/master/platform/common/managed_storage.json
|
||||||
|
"uBlock0@raymondhill.net".adminSettings = {
|
||||||
|
userSettings = rec {
|
||||||
|
uiTheme = "dark";
|
||||||
|
uiAccentCustom = true;
|
||||||
|
uiAccentCustom0 = "#0C8084";
|
||||||
|
cloudStorageEnabled = lib.mkForce false;
|
||||||
|
importedLists = [
|
||||||
|
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
];
|
||||||
|
externalLists = lib.concatStringsSep "\n" importedLists;
|
||||||
|
};
|
||||||
|
selectedFilterLists = [
|
||||||
|
"CZE-0"
|
||||||
|
"adguard-generic"
|
||||||
|
"adguard-annoyance"
|
||||||
|
"adguard-social"
|
||||||
|
"adguard-spyware-url"
|
||||||
|
"easylist"
|
||||||
|
"easyprivacy"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
"plowe-0"
|
||||||
|
"ublock-abuse"
|
||||||
|
"ublock-badware"
|
||||||
|
"ublock-filters"
|
||||||
|
"ublock-privacy"
|
||||||
|
"ublock-quick-fixes"
|
||||||
|
"ublock-unbreak"
|
||||||
|
"urlhaus-1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
id = 0;
|
id = 0;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
userChrome = builtins.readFile ../../../programs/firefox/chrome/userChrome.css;
|
userChrome = builtins.readFile (self + /programs/firefox/chrome/userChrome.css);
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
tridactyl
|
tridactyl
|
||||||
|
tampermonkey
|
||||||
browserpass
|
browserpass
|
||||||
clearurls
|
clearurls
|
||||||
darkreader
|
darkreader
|
||||||
|
|
@ -8130,57 +8258,115 @@ I used to build the firefox addon =bypass-paywalls-clean= myself here, but the m
|
||||||
unpaywall
|
unpaywall
|
||||||
don-t-fuck-with-paste
|
don-t-fuck-with-paste
|
||||||
plasma-integration
|
plasma-integration
|
||||||
|
(buildFirefoxXpiAddon {
|
||||||
|
pname = "shortkeys";
|
||||||
|
version = "4.0.2";
|
||||||
|
addonId = "Shortkeys@Shortkeys.com";
|
||||||
|
url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi";
|
||||||
|
sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c";
|
||||||
|
meta = with lib;
|
||||||
|
{
|
||||||
|
description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys";
|
||||||
|
mozPermissions = [
|
||||||
|
"tabs"
|
||||||
|
"downloads"
|
||||||
|
"clipboardWrite"
|
||||||
|
"browsingData"
|
||||||
|
"storage"
|
||||||
|
"bookmarks"
|
||||||
|
"sessions"
|
||||||
|
"<all_urls>"
|
||||||
|
];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
search.engines = {
|
settings = {
|
||||||
"Nix Packages" = {
|
"extensions.autoDisableScopes" = 0;
|
||||||
urls = [{
|
"browser.bookmarks.showMobileBookmarks" = lock-true;
|
||||||
template = "https://search.nixos.org/packages";
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true;
|
||||||
params = [
|
"browser.search.suggest.enabled" = lock-false;
|
||||||
{ name = "type"; value = "packages"; }
|
"browser.search.suggest.enabled.private" = lock-false;
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
"browser.urlbar.suggest.searches" = lock-false;
|
||||||
];
|
"browser.urlbar.showSearchSuggestionsFirst" = lock-false;
|
||||||
}];
|
"browser.topsites.contile.enabled" = lock-false;
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||||
definedAliases = [ "@np" ];
|
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||||
};
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
|
||||||
"NixOS Wiki" = {
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
|
||||||
urls = [{
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
|
||||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||||
}];
|
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
};
|
||||||
definedAliases = [ "@nw" ];
|
|
||||||
};
|
search = {
|
||||||
|
default = "Kagi";
|
||||||
"NixOS Options" = {
|
privateDefault = "Kagi";
|
||||||
urls = [{
|
engines = {
|
||||||
template = "https://search.nixos.org/options";
|
"Kagi" = {
|
||||||
params = [
|
urls = [{
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
template = "https://kagi.com/search";
|
||||||
];
|
params = [
|
||||||
}];
|
{ name = "q"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
}];
|
||||||
definedAliases = [ "@no" ];
|
iconUpdateURL = "https://kagi.com/favicon.ico";
|
||||||
};
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
|
definedAliases = [ "@k" ];
|
||||||
"Home Manager Options" = {
|
};
|
||||||
urls = [{
|
|
||||||
template = "https://home-manager-options.extranix.com/";
|
"Nix Packages" = {
|
||||||
params = [
|
urls = [{
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
template = "https://search.nixos.org/packages";
|
||||||
];
|
params = [
|
||||||
}];
|
{ name = "type"; value = "packages"; }
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
];
|
||||||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
}];
|
||||||
};
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@np" ];
|
||||||
"Google".metaData.alias = "@g";
|
};
|
||||||
|
|
||||||
|
"NixOS Wiki" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||||
|
}];
|
||||||
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
|
definedAliases = [ "@nw" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"NixOS Options" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/options";
|
||||||
|
params = [
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@no" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Home Manager Options" = {
|
||||||
|
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" "@ho" "@hmo" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Google".metaData.alias = "@g";
|
||||||
|
};
|
||||||
|
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||||
};
|
};
|
||||||
search.force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,154 @@
|
||||||
{ pkgs, ... }:
|
{ self, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
lock-false = {
|
||||||
|
Value = false;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
lock-true = {
|
||||||
|
Value = true;
|
||||||
|
Status = "locked";
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox; # uses overrides
|
package = pkgs.firefox; # uses overrides
|
||||||
policies = {
|
policies = {
|
||||||
# CaptivePortal = false;
|
# CaptivePortal = false;
|
||||||
|
AppAutoUpdate = false;
|
||||||
|
BackgroundAppUpdate = false;
|
||||||
|
DisableBuiltinPDFViewer = true;
|
||||||
DisableFirefoxStudies = true;
|
DisableFirefoxStudies = true;
|
||||||
DisablePocket = true;
|
DisablePocket = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
DisableTelemetry = true;
|
DisableTelemetry = true;
|
||||||
DisableFirefoxAccounts = false;
|
DisableFirefoxAccounts = false;
|
||||||
|
DisableProfileImport = true;
|
||||||
|
DisableProfileRefresh = true;
|
||||||
DisplayBookmarksToolbar = "always";
|
DisplayBookmarksToolbar = "always";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
NoDefaultBookmarks = true;
|
NoDefaultBookmarks = true;
|
||||||
OfferToSaveLogins = false;
|
OfferToSaveLogins = false;
|
||||||
OfferToSaveLoginsDefault = false;
|
OfferToSaveLoginsDefault = false;
|
||||||
EnableTrackingProtection = true;
|
PasswordManagerEnabled = false;
|
||||||
|
DisableMasterPasswordCreation = true;
|
||||||
|
ExtensionUpdate = false;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
EmailTracking = true;
|
||||||
|
# Exceptions = ["https://example.com"]
|
||||||
|
};
|
||||||
|
PDFjs = {
|
||||||
|
Enabled = false;
|
||||||
|
EnablePermissions = false;
|
||||||
|
};
|
||||||
|
Handlers = {
|
||||||
|
mimeTypes."application/pdf".action = "saveToDisk";
|
||||||
|
};
|
||||||
|
extensions = {
|
||||||
|
pdf = {
|
||||||
|
action = "useHelperApp";
|
||||||
|
ask = true;
|
||||||
|
handlers = [
|
||||||
|
{
|
||||||
|
name = "GNOME Document Viewer";
|
||||||
|
path = "${pkgs.evince}/bin/evince";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = true;
|
||||||
|
TopSites = true;
|
||||||
|
SponsoredTopSites = false;
|
||||||
|
Highlights = true;
|
||||||
|
Pocket = false;
|
||||||
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = false;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SanitizeOnShutdown = {
|
||||||
|
Cache = true;
|
||||||
|
Cookies = false;
|
||||||
|
Downloads = true;
|
||||||
|
FormData = true;
|
||||||
|
History = false;
|
||||||
|
Sessions = false;
|
||||||
|
SiteSettings = false;
|
||||||
|
OfflineApps = true;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SearchEngines = {
|
||||||
|
PreventInstalls = true;
|
||||||
|
Remove = [
|
||||||
|
"Bing" # Fuck you
|
||||||
|
];
|
||||||
|
};
|
||||||
|
UserMessaging = {
|
||||||
|
ExtensionRecommendations = false; # Don’t recommend extensions while the user is visiting web pages
|
||||||
|
FeatureRecommendations = false; # Don’t recommend browser features
|
||||||
|
Locked = true; # Prevent the user from changing user messaging preferences
|
||||||
|
MoreFromMozilla = false; # Don’t show the “More from Mozilla” section in Preferences
|
||||||
|
SkipOnboarding = true; # Don’t show onboarding messages on the new tab page
|
||||||
|
UrlbarInterventions = false; # Don’t offer suggestions in the URL bar
|
||||||
|
WhatsNew = false; # Remove the “What’s New” icon and menuitem
|
||||||
|
};
|
||||||
|
ExtensionSettings = {
|
||||||
|
"3rdparty".Extensions = {
|
||||||
|
# https://github.com/gorhill/uBlock/blob/master/platform/common/managed_storage.json
|
||||||
|
"uBlock0@raymondhill.net".adminSettings = {
|
||||||
|
userSettings = rec {
|
||||||
|
uiTheme = "dark";
|
||||||
|
uiAccentCustom = true;
|
||||||
|
uiAccentCustom0 = "#0C8084";
|
||||||
|
cloudStorageEnabled = lib.mkForce false;
|
||||||
|
importedLists = [
|
||||||
|
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
];
|
||||||
|
externalLists = lib.concatStringsSep "\n" importedLists;
|
||||||
|
};
|
||||||
|
selectedFilterLists = [
|
||||||
|
"CZE-0"
|
||||||
|
"adguard-generic"
|
||||||
|
"adguard-annoyance"
|
||||||
|
"adguard-social"
|
||||||
|
"adguard-spyware-url"
|
||||||
|
"easylist"
|
||||||
|
"easyprivacy"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
"plowe-0"
|
||||||
|
"ublock-abuse"
|
||||||
|
"ublock-badware"
|
||||||
|
"ublock-filters"
|
||||||
|
"ublock-privacy"
|
||||||
|
"ublock-quick-fixes"
|
||||||
|
"ublock-unbreak"
|
||||||
|
"urlhaus-1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
id = 0;
|
id = 0;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
userChrome = builtins.readFile ../../../programs/firefox/chrome/userChrome.css;
|
userChrome = builtins.readFile (self + /programs/firefox/chrome/userChrome.css);
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
tridactyl
|
tridactyl
|
||||||
|
tampermonkey
|
||||||
browserpass
|
browserpass
|
||||||
clearurls
|
clearurls
|
||||||
darkreader
|
darkreader
|
||||||
|
|
@ -37,57 +165,115 @@
|
||||||
unpaywall
|
unpaywall
|
||||||
don-t-fuck-with-paste
|
don-t-fuck-with-paste
|
||||||
plasma-integration
|
plasma-integration
|
||||||
|
(buildFirefoxXpiAddon {
|
||||||
|
pname = "shortkeys";
|
||||||
|
version = "4.0.2";
|
||||||
|
addonId = "Shortkeys@Shortkeys.com";
|
||||||
|
url = "https://addons.mozilla.org/firefox/downloads/file/3673761/shortkeys-4.0.2.xpi";
|
||||||
|
sha256 = "c6fe12efdd7a871787ac4526eea79ecc1acda8a99724aa2a2a55c88a9acf467c";
|
||||||
|
meta = with lib;
|
||||||
|
{
|
||||||
|
description = "Easily customizable custom keyboard shortcuts for Firefox. To configure this addon go to Addons (ctrl+shift+a) ->Shortkeys ->Options. Report issues here (please specify that the issue is found in Firefox): https://github.com/mikecrittenden/shortkeys";
|
||||||
|
mozPermissions = [
|
||||||
|
"tabs"
|
||||||
|
"downloads"
|
||||||
|
"clipboardWrite"
|
||||||
|
"browsingData"
|
||||||
|
"storage"
|
||||||
|
"bookmarks"
|
||||||
|
"sessions"
|
||||||
|
"<all_urls>"
|
||||||
|
];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
search.engines = {
|
settings = {
|
||||||
"Nix Packages" = {
|
"extensions.autoDisableScopes" = 0;
|
||||||
urls = [{
|
"browser.bookmarks.showMobileBookmarks" = lock-true;
|
||||||
template = "https://search.nixos.org/packages";
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true;
|
||||||
params = [
|
"browser.search.suggest.enabled" = lock-false;
|
||||||
{ name = "type"; value = "packages"; }
|
"browser.search.suggest.enabled.private" = lock-false;
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
"browser.urlbar.suggest.searches" = lock-false;
|
||||||
];
|
"browser.urlbar.showSearchSuggestionsFirst" = lock-false;
|
||||||
}];
|
"browser.topsites.contile.enabled" = lock-false;
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||||
definedAliases = [ "@np" ];
|
"browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||||
};
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||||
|
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
|
||||||
"NixOS Wiki" = {
|
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
|
||||||
urls = [{
|
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
|
||||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||||
}];
|
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
};
|
||||||
definedAliases = [ "@nw" ];
|
|
||||||
};
|
search = {
|
||||||
|
default = "Kagi";
|
||||||
"NixOS Options" = {
|
privateDefault = "Kagi";
|
||||||
urls = [{
|
engines = {
|
||||||
template = "https://search.nixos.org/options";
|
"Kagi" = {
|
||||||
params = [
|
urls = [{
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
template = "https://kagi.com/search";
|
||||||
];
|
params = [
|
||||||
}];
|
{ name = "q"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
}];
|
||||||
definedAliases = [ "@no" ];
|
iconUpdateURL = "https://kagi.com/favicon.ico";
|
||||||
};
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
|
definedAliases = [ "@k" ];
|
||||||
"Home Manager Options" = {
|
};
|
||||||
urls = [{
|
|
||||||
template = "https://home-manager-options.extranix.com/";
|
"Nix Packages" = {
|
||||||
params = [
|
urls = [{
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
template = "https://search.nixos.org/packages";
|
||||||
];
|
params = [
|
||||||
}];
|
{ name = "type"; value = "packages"; }
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
];
|
||||||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
}];
|
||||||
};
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@np" ];
|
||||||
"Google".metaData.alias = "@g";
|
};
|
||||||
|
|
||||||
|
"NixOS Wiki" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||||
|
}];
|
||||||
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||||
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
|
definedAliases = [ "@nw" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"NixOS Options" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/options";
|
||||||
|
params = [
|
||||||
|
{ name = "query"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@no" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Home Manager Options" = {
|
||||||
|
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" "@ho" "@hmo" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Google".metaData.alias = "@g";
|
||||||
|
};
|
||||||
|
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||||
};
|
};
|
||||||
search.force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue