From 5d2d26b3d944f214af2d24fa54f811fd0ce61db0 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 1 Jan 2024 20:50:48 -0500 Subject: [PATCH] update firefox addons, add back bpc --- flake.lock | 17 +++++++++++++++++ flake.nix | 8 ++++++++ modules/common/applications/firefox.nix | 18 ++++++++++-------- overlays/bypass-paywalls-clean.nix | 20 ++++++++++++++++++++ 4 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 overlays/bypass-paywalls-clean.nix diff --git a/flake.lock b/flake.lock index 7394d71..aacc019 100644 --- a/flake.lock +++ b/flake.lock @@ -67,6 +67,22 @@ "type": "github" } }, + "bypass-paywalls-clean": { + "flake": false, + "locked": { + "lastModified": 1704020593, + "narHash": "sha256-k0RuPnQ1PGjzF5U05nkaunzDHCx0PrU8NNutAjvCDt0=", + "owner": "magnolia1234", + "repo": "bpc-uploads", + "rev": "d111b9c483294c9db9a1d2ecb8c08a4b3bb15ff6", + "type": "gitlab" + }, + "original": { + "owner": "magnolia1234", + "repo": "bpc-uploads", + "type": "gitlab" + } + }, "cmp-nvim-lsp-src": { "flake": false, "locked": { @@ -519,6 +535,7 @@ "age": "age", "baleia-nvim-src": "baleia-nvim-src", "bufferline-nvim-src": "bufferline-nvim-src", + "bypass-paywalls-clean": "bypass-paywalls-clean", "cmp-nvim-lsp-src": "cmp-nvim-lsp-src", "darwin": "darwin", "disko": "disko", diff --git a/flake.nix b/flake.nix index 9b4322a..4fc264f 100644 --- a/flake.nix +++ b/flake.nix @@ -171,6 +171,13 @@ flake = false; }; + # Firefox addon from outside the extension store + bypass-paywalls-clean = { + # https://gitlab.com/magnolia1234/bpc-uploads/-/commits/master/?ref_type=HEADS + url = "gitlab:magnolia1234/bpc-uploads"; + flake = false; + }; + # Nextcloud Apps nextcloud-news = { # https://github.com/nextcloud/news/releases @@ -237,6 +244,7 @@ (import ./overlays/age.nix inputs) (import ./overlays/proton-ge.nix inputs) (import ./overlays/gh-collaborators.nix) + (import ./overlays/bypass-paywalls-clean.nix inputs) ]; # System types to support. diff --git a/modules/common/applications/firefox.nix b/modules/common/applications/firefox.nix index f56f1c3..f7e5f3b 100644 --- a/modules/common/applications/firefox.nix +++ b/modules/common/applications/firefox.nix @@ -30,19 +30,21 @@ name = "default"; isDefault = true; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - ublock-origin - vimium - multi-account-containers - facebook-container (lib.mkIf config._1password.enable onepassword-password-manager) + pkgs.bypass-paywalls-clean + darkreader + don-t-fuck-with-paste + facebook-container + markdownload + multi-account-containers okta-browser-plugin - sponsorblock reddit-enhancement-suite return-youtube-dislikes - markdownload - darkreader snowflake - don-t-fuck-with-paste + sponsorblock + ublock-origin + ublacklist + vimium wappalyzer ]; settings = { diff --git a/overlays/bypass-paywalls-clean.nix b/overlays/bypass-paywalls-clean.nix new file mode 100644 index 0000000..2bcc7ab --- /dev/null +++ b/overlays/bypass-paywalls-clean.nix @@ -0,0 +1,20 @@ +inputs: _final: prev: { + + # Based on: + # https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34 + + bypass-paywalls-clean = let addonId = "magnolia@12.34"; + in prev.stdenv.mkDerivation rec { + pname = "bypass-paywalls-clean"; + version = "3.4.9.0"; + src = inputs.bypass-paywalls-clean + "/bypass_paywalls_clean-latest.xpi"; + preferLocalBuild = true; + allowSubstitutes = true; + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "${src}" "$dst/${addonId}.xpi" + ''; + }; + +}