From 676424ae0f0b64b211fb776eb2f51ae6b65f0cd6 Mon Sep 17 00:00:00 2001 From: willemml Date: Tue, 21 Feb 2023 15:31:52 -0800 Subject: [PATCH] Fix firefox. --- home/darwin.nix | 4 +- home/programs.nix | 107 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 95 insertions(+), 16 deletions(-) diff --git a/home/darwin.nix b/home/darwin.nix index cae2283..e0b1279 100644 --- a/home/darwin.nix +++ b/home/darwin.nix @@ -7,13 +7,15 @@ let calibre = "Calibre"; discord = "Discord"; email = "Mail"; + firefox = "Firefox"; ical = "Calendar"; im = "Messages"; maps = "Maps"; music = "Music"; + safari = "Safari"; settings = "System Settings"; spotify = "Spotify"; - web = "Safari"; + web = "Firefox"; zotero = "Zotero"; }; in diff --git a/home/programs.nix b/home/programs.nix index 389b328..e04faf7 100644 --- a/home/programs.nix +++ b/home/programs.nix @@ -34,21 +34,98 @@ firefox = { enable = true; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - browserpass - bypass-paywalls-clean - clearurls - don-t-fuck-with-paste - dracula-dark-colorscheme - edit-with-emacs - fastforward - i-dont-care-about-cookies - multi-account-containers - musescore-downloader - offline-qr-code-generator - ublock-origin - zoom-redirector - ]; + profiles.primary = { + id = 0; + isDefault = true; + search = { + force = true; + default = "DuckDuckGo"; + order = [ + "DuckDuckGo" + "Google" + ]; + engines = { + "Nix Packages" = { + urls = [{ + 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 = [ "@np" ]; + }; + + "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" ]; + }; + + "Bing".metaData.hidden = true; + "Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias + }; + }; + settings = { + "browser.startup.homepage" = "https://github.com/willemml/org-notes"; + "browser.search.region" = "CA"; + "browser.search.isUS" = false; + "distribution.searchplugins.defaultLocale" = "en-CA"; + "general.useragent.locale" = "en-CA"; + "browser.bookmarks.showMobileBookmarks" = true; + "browser.newtabpage.pinned" = [{ + title = "Notes"; + url = "https://github.com/willemml/org-notes"; + } + { + title = "Dotfiles"; + url = "https://github.com/willemml/dotfiles.nix"; + }]; + }; + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + browserpass + #bypass-paywalls-clean + clearurls + don-t-fuck-with-paste + dracula-dark-colorscheme + edit-with-emacs + fastforward + i-dont-care-about-cookies + multi-account-containers + musescore-downloader + offline-qr-code-generator + ublock-origin + zoom-redirector + ]; + bookmarks = [ + { + name = "wikipedia"; + keyword = "wiki"; + url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; + } + { + name = "kernel.org"; + url = "https://www.kernel.org"; + } + { + name = "Nix sites"; + bookmarks = [ + { + name = "homepage"; + url = "https://nixos.org/"; + } + { + name = "wiki"; + keyword = "nixwiki"; + url = "https://nixos.wiki/"; + } + ]; + } + ]; + }; }; fzf = {