From 27792144fcd46737b7b8e076bd52cbbb26694427 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 11 Jan 2025 16:40:28 -0800 Subject: [PATCH] feat(home): Package missing addons Can't believe that worked lol didn't really expect it to --- modules/home/programs/floorp/default.nix | 52 ++++---- overlays/firefox-addons/addons.json | 42 ++++++ overlays/firefox-addons/default.nix | 156 +++++++++++++++++++++++ 3 files changed, 228 insertions(+), 22 deletions(-) create mode 100644 overlays/firefox-addons/addons.json create mode 100644 overlays/firefox-addons/default.nix diff --git a/modules/home/programs/floorp/default.nix b/modules/home/programs/floorp/default.nix index 0b85241..7112bec 100644 --- a/modules/home/programs/floorp/default.nix +++ b/modules/home/programs/floorp/default.nix @@ -16,28 +16,36 @@ in { profiles = { "${config.marleyos.my.name}" = { - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - bitwarden - catppuccin-gh-file-explorer - clearurls - consent-o-matic - darkreader - facebook-container - kagi-search - # libredirect - # proton-vpn - raindropio - refined-github - shinigami-eyes - snowflake - stylus - tampermonkey - ublock-origin - # vue-js-devtools - # wappalyzer - wayback-machine - # xdebug-helper-for-firefox - ]; + extensions = + (with pkgs.nur.repos.rycee.firefox-addons; [ + bitwarden + catppuccin-gh-file-explorer + clearurls + consent-o-matic + darkreader + facebook-container + kagi-search + # libredirect + # proton-vpn + raindropio + refined-github + shinigami-eyes + snowflake + stylus + tampermonkey + ublock-origin + # vue-js-devtools + # wappalyzer + wayback-machine + # xdebug-helper-for-firefox + ]) + ++ (with pkgs.marleys-firefox-addons; [ + axe-devtools + # clockwork-dev-tools + medium-parser + readwise + readwise-highlighter + ]); settings = { # https://arkenfox.github.io/gui/ diff --git a/overlays/firefox-addons/addons.json b/overlays/firefox-addons/addons.json new file mode 100644 index 0000000..6adbf73 --- /dev/null +++ b/overlays/firefox-addons/addons.json @@ -0,0 +1,42 @@ +[ + { + "slug": "axe-devtools", + "license": { + "tag": "custom", + "shortName": "axe-devtools", + "fullName": "Custom License for axe DevTools", + "url": "https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/license/", + "free": false + } + }, + { + "slug": "readwise-highlighter", + "license": { + "tag": "custom", + "shortName": "allrightsreserved", + "fullName": "All Rights Reserved", + "url": "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186", + "free": false + } + }, + { + "slug": "readwise", + "license": { + "tag": "custom", + "shortName": "allrightsreserved", + "fullName": "All Rights Reserved", + "url": "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186", + "free": false + } + }, + { + "slug": "medium-parser" + }, + { + "slug": "clockwork-dev-tools", + "license": { + "tag": "predefined", + "shortName": "mit" + } + } +] diff --git a/overlays/firefox-addons/default.nix b/overlays/firefox-addons/default.nix new file mode 100644 index 0000000..cdd43a3 --- /dev/null +++ b/overlays/firefox-addons/default.nix @@ -0,0 +1,156 @@ +{ + lib, + channels, + ... +}: let + buildFirefoxXpiAddon = lib.makeOverridable ({ + stdenv ? channels.nixpkgs.stdenv, + fetchurl ? channels.nixpkgs.fetchurl, + pname, + version, + addonId, + url, + sha256, + meta, + ... + }: + stdenv.mkDerivation { + name = "${pname}-${version}"; + + inherit meta; + + src = fetchurl {inherit url sha256;}; + + preferLocalBuild = true; + allowSubstitutes = true; + + passthru = {inherit addonId;}; + + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "$src" "$dst/${addonId}.xpi" + ''; + }); +in + final: prev: { + marleys-firefox-addons = { + "axe-devtools" = buildFirefoxXpiAddon { + pname = "axe-devtools"; + version = "4.94.1"; + addonId = "@axe-firefox-devtools"; + url = "https://addons.mozilla.org/firefox/downloads/file/4374713/axe_devtools-4.94.1.xpi"; + sha256 = "92e8152da2b07303b1efd87c5a5b45e3ec847bf4760016809b5f5714a478f50b"; + meta = with lib; { + homepage = "https://www.deque.com/"; + description = "Add accessibility auditing to the Firefox Developer Tools"; + license = { + shortName = "axe-devtools"; + fullName = "Custom License for axe DevTools"; + url = "https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/license/"; + free = false; + }; + mozPermissions = [ + "tabs" + "storage" + "activeTab" + "devtools" + "" + ]; + platforms = platforms.all; + }; + }; + "clockwork-dev-tools" = buildFirefoxXpiAddon { + pname = "clockwork-dev-tools"; + version = "5.3.1"; + addonId = "{c9b5d073-47b4-40df-b9b9-d80601a5ab76}"; + url = "https://addons.mozilla.org/firefox/downloads/file/4391092/clockwork_dev_tools-5.3.1.xpi"; + sha256 = "56b372b0e3fe1c8aa6ec0e82e882ab7b922e1bdd04f4435a1c7812ae674776f0"; + meta = with lib; { + homepage = "https://underground.works/clockwork"; + description = "php dev tools integrated to your browser"; + license = licenses.mit; + mozPermissions = [ + "cookies" + "storage" + "tabs" + "webNavigation" + "webRequest" + "http://*/" + "https://*/" + "devtools" + ]; + platforms = platforms.all; + }; + }; + "medium-parser" = buildFirefoxXpiAddon { + pname = "medium-parser"; + version = "1.5.5"; + addonId = "medium-parser@example.com"; + url = "https://addons.mozilla.org/firefox/downloads/file/4283826/medium_parser-1.5.5.xpi"; + sha256 = "4aa61952269c2eb48c53d8355f94c17abc27d358c20738970d96d8d9f14b07b6"; + meta = with lib; { + homepage = "https://github.com/Xatta-Trone/medium-parser-extension"; + description = "Unlocks the whole medium article on the go."; + license = licenses.mpl20; + mozPermissions = ["storage" "contextMenus" ""]; + platforms = platforms.all; + }; + }; + "readwise" = buildFirefoxXpiAddon { + pname = "readwise"; + version = "2.8.0"; + addonId = "{f7619bc3-ed22-44a3-83ad-e79a78416737}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3732256/readwise-2.8.0.xpi"; + sha256 = "a1bb894e3af1ed0d80c80af6bdafca930ecd0fbc95e409d20f74943b7076d106"; + meta = with lib; { + homepage = "https://readwise.io"; + description = "Don't let your kindle highlights disappear. Sync them with Readwise and then review them daily."; + license = { + shortName = "allrightsreserved"; + fullName = "All Rights Reserved"; + url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186"; + free = false; + }; + mozPermissions = [ + "notifications" + "cookies" + "storage" + "alarms" + "contextMenus" + "*://read.amazon.com/*" + "*://*.readwise.io/*" + ]; + platforms = platforms.all; + }; + }; + "readwise-highlighter" = buildFirefoxXpiAddon { + pname = "readwise-highlighter"; + version = "0.15.23"; + addonId = "team@readwise.io"; + url = "https://addons.mozilla.org/firefox/downloads/file/4222692/readwise_highlighter-0.15.23.xpi"; + sha256 = "260eb678acbbb37b5bb34211ff31ce4b32e94158fefb04d46323d4e0c5018a94"; + meta = with lib; { + homepage = "https://read.readwise.io"; + description = "The Readwise Highlighter is the official browser extension made by and maintained by the Readwise team that saves articles to your Reader account and enables you to optionally highlight the open web."; + license = { + shortName = "allrightsreserved"; + fullName = "All Rights Reserved"; + url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186"; + free = false; + }; + mozPermissions = [ + "" + "activeTab" + "background" + "contextMenus" + "notifications" + "storage" + "tabs" + "unlimitedStorage" + ]; + platforms = platforms.all; + }; + }; + }; + }