From 9a4d9a7330f0054eb998f0ca5b58f9b01e27cccf Mon Sep 17 00:00:00 2001 From: chayleaf Date: Fri, 13 Oct 2023 04:52:52 +0700 Subject: [PATCH] home/firefox: switch up extension forks/versions --- home/common/firefox.nix | 4 +- home/hosts/nixmsi.nix | 4 ++ pkgs/_sources/generated.json | 17 +------- pkgs/_sources/generated.nix | 8 ---- pkgs/default.nix | 2 +- pkgs/firefox-addons/addons.json | 10 ++--- pkgs/firefox-addons/default.nix | 64 ++++++++++--------------------- pkgs/firefox-addons/generated.nix | 52 +++++++++++++++++++++++++ pkgs/nvfetcher.toml | 6 --- 9 files changed, 85 insertions(+), 82 deletions(-) diff --git a/home/common/firefox.nix b/home/common/firefox.nix index c687d38..108ea38 100644 --- a/home/common/firefox.nix +++ b/home/common/firefox.nix @@ -56,9 +56,9 @@ vimium-c youtube-shorts-block ] ++ (with pkgs.firefox-addons; [ - fastforward + fastforwardteam middle-mouse-button-scroll - yomichan + rikaitan youtube-nonstop ]); }; diff --git a/home/hosts/nixmsi.nix b/home/hosts/nixmsi.nix index 6ca361e..cadf4ec 100644 --- a/home/hosts/nixmsi.nix +++ b/home/hosts/nixmsi.nix @@ -54,6 +54,10 @@ enable = true; }; services.kdeconnect.enable = true; + systemd.user.services.kdeconnect.Service = { + Restart = lib.mkForce "always"; + RestartSec = "30"; + }; home.sessionVariables = { STEAM_EXTRA_COMPAT_TOOLS_PATHS = "${pkgs.proton-ge}"; CARGO_PROFILE_DEV_INCREMENTAL = "true"; diff --git a/pkgs/_sources/generated.json b/pkgs/_sources/generated.json index ee3a032..bc4d4a8 100644 --- a/pkgs/_sources/generated.json +++ b/pkgs/_sources/generated.json @@ -13,21 +13,6 @@ }, "version": "c30a1caf8274af67bf31f3fb5abc45df5737df36" }, - "fastforward": { - "cargoLocks": null, - "date": null, - "extract": null, - "name": "fastforward", - "passthru": null, - "pinned": false, - "src": { - "name": null, - "sha256": "sha256-mrWvbjqUphMKi8ItRFSmRAzMyzsqB9rJbZFm+I7ocSc=", - "type": "url", - "url": "https://github.com/FastForwardTeam/FastForward/releases/download/0.2237/fastforwardteam-0.2237.xpi" - }, - "version": "0.2237" - }, "proton-ge": { "cargoLocks": null, "date": null, @@ -57,4 +42,4 @@ }, "version": "ce270961e82585971579844c64d7cde5f5d855ec" } -} \ No newline at end of file +} diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 6d309dd..eee9ac6 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -10,14 +10,6 @@ }; date = "2022-12-13"; }; - fastforward = { - pname = "fastforward"; - version = "0.2237"; - src = fetchurl { - url = "https://github.com/FastForwardTeam/FastForward/releases/download/0.2237/fastforwardteam-0.2237.xpi"; - sha256 = "sha256-mrWvbjqUphMKi8ItRFSmRAzMyzsqB9rJbZFm+I7ocSc="; - }; - }; proton-ge = { pname = "proton-ge"; version = "GE-Proton8-16"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 5973ec3..c656db9 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -121,6 +121,6 @@ in qemu = pkgs'.qemu_7; stdenv = pkgs'.ccacheStdenv; }; - gimp = callPackage ./gimp.nix { inherit (pkgs) gimp; }; + gimp = callPackage ./gimp { inherit (pkgs) gimp; }; } // (import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }) diff --git a/pkgs/firefox-addons/addons.json b/pkgs/firefox-addons/addons.json index 7cfa6e3..3001243 100644 --- a/pkgs/firefox-addons/addons.json +++ b/pkgs/firefox-addons/addons.json @@ -1,8 +1,6 @@ [ - { - "slug": "youtube-nonstop" - }, - { - "slug": "middle-mouse-button-scroll" - } + { "slug": "fastforwardteam" }, + { "slug": "middle-mouse-button-scroll" }, + { "slug": "rikaitan" }, + { "slug": "youtube-nonstop" } ] diff --git a/pkgs/firefox-addons/default.nix b/pkgs/firefox-addons/default.nix index dc150b7..8d3d0c6 100644 --- a/pkgs/firefox-addons/default.nix +++ b/pkgs/firefox-addons/default.nix @@ -1,51 +1,29 @@ -{ pkgs -, lib +{ lib , stdenv , fetchurl , nur -, sources +# , pkgs , ... }: -let - buildExtension = { pname, version, src, id, meta ? { } }: pkgs.stdenvNoCC.mkDerivation { - inherit pname version src meta; - preferLocalBuild = true; - allowSubstitutes = true; - buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/"'${id}' - ''; - }; -in -(import ./generated.nix { +# let +# buildExtension = { pname, version, src, id, meta ? { } }: pkgs.stdenvNoCC.mkDerivation { +# inherit pname version src meta; +# preferLocalBuild = true; +# allowSubstitutes = true; +# buildCommand = '' +# dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" +# mkdir -p "$dst" +# install -v -m644 "$src" "$dst/"'${id}' +# ''; +# }; +# = buildExtension { +# inherit (sources.) pname version src; +# id = ""; +# meta = with lib; { platforms = platforms.all; }; +# }; +# in + +import ./generated.nix { inherit lib stdenv fetchurl; inherit (nur.repos.rycee.firefox-addons) buildFirefoxXpiAddon; -}) // { - # this is no longer maintained, hardcode last released version - yomichan = buildExtension { - pname = "yomichan"; - version = "22.10.23.0"; - src = fetchurl { - url = "https://github.com/FooSoft/yomichan/releases/download/22.10.23.0/yomichan-firefox-dev.xpi"; - sha256 = "sha256-l70wVXHEArifukDelZeoVxIyP2Crs6QZSD/kFdEml/8="; - }; - id = "alex.testing@foosoft.net.xpi"; - meta = with lib; { - homepage = "https://foosoft.net/projects/yomichan"; - description = "Yomichan turns your browser into a tool for building Japanese language literacy by helping you to decipher texts which would be otherwise too difficult tackle. It features a robust dictionary with EPWING and flashcard creation support"; - license = licenses.gpl3; - platforms = platforms.all; - }; - }; - fastforward = buildExtension { - inherit (sources.fastforward) pname version src; - id = "addon@fastforward.team"; - meta = with lib; { - homepage = "https://fastforward.team"; - description = "Don't waste time with compliance. Use FastForward to skip annoying URL \"shorteners\""; - license = licenses.unlicense; - platforms = platforms.all; - }; - }; } diff --git a/pkgs/firefox-addons/generated.nix b/pkgs/firefox-addons/generated.nix index d7974a0..aea8923 100644 --- a/pkgs/firefox-addons/generated.nix +++ b/pkgs/firefox-addons/generated.nix @@ -1,5 +1,26 @@ { buildFirefoxXpiAddon, fetchurl, lib, stdenv }: { + "fastforwardteam" = buildFirefoxXpiAddon { + pname = "fastforwardteam"; + version = "0.2334"; + addonId = "addon@fastforward.team"; + url = "https://addons.mozilla.org/firefox/downloads/file/4177101/fastforwardteam-0.2334.xpi"; + sha256 = "d790219622469f08316b41c0d01abf2b584a37fa87b45666a74bd30cffb95ed0"; + meta = with lib; + { + homepage = "https://fastforward.team"; + description = "Don't waste time with compliance. Use FastForward to skip annoying URL \"shorteners\"."; + mozPermissions = [ + "alarms" + "storage" + "webNavigation" + "tabs" + "declarativeNetRequestWithHostAccess" + "" + ]; + platforms = platforms.all; + }; + }; "middle-mouse-button-scroll" = buildFirefoxXpiAddon { pname = "middle-mouse-button-scroll"; version = "0.3.2"; @@ -10,6 +31,33 @@ { homepage = "https://github.com/StoyanDimitrov/middle-mouse-button-scroll"; description = "Scroll fast or precise through long documents with pressed middle mouse button"; + mozPermissions = [ "*://*/*" ]; + platforms = platforms.all; + }; + }; + "rikaitan" = buildFirefoxXpiAddon { + pname = "rikaitan"; + version = "23.9.25.1"; + addonId = "tatsu@autistici.org"; + url = "https://addons.mozilla.org/firefox/downloads/file/4172402/rikaitan-23.9.25.1.xpi"; + sha256 = "d954f90939455dd52ce161729d7175fac63cf10daea386a1eab34529e03c8f29"; + meta = with lib; + { + homepage = "https://github.com/Ajatt-Tools/rikaitan"; + description = "Japanese dictionary with Anki integration. \n\nThis project is a community-driven fork of Yomichan, which is no longer maintained."; + license = licenses.lgpl3; + mozPermissions = [ + "" + "storage" + "clipboardWrite" + "unlimitedStorage" + "webRequest" + "webRequestBlocking" + "nativeMessaging" + "http://*/*" + "https://*/*" + "file://*/*" + ]; platforms = platforms.all; }; }; @@ -24,6 +72,10 @@ homepage = "https://github.com/lawfx/YoutubeNonStop"; description = "Tired of getting that \"Video paused. Continue watching?\" confirmation dialog?\nThis extension autoclicks it, so you can listen to your favorite music uninterrupted.\n\nWorking on YouTube and YouTube Music!"; license = licenses.mit; + mozPermissions = [ + "https://www.youtube.com/*" + "https://music.youtube.com/*" + ]; platforms = platforms.all; }; }; diff --git a/pkgs/nvfetcher.toml b/pkgs/nvfetcher.toml index 0f84672..62d64cb 100644 --- a/pkgs/nvfetcher.toml +++ b/pkgs/nvfetcher.toml @@ -2,12 +2,6 @@ src.github = "GloriousEggroll/proton-ge-custom" fetch.url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/$ver/$ver.tar.gz" -[fastforward] -# allow prereleases -src.github_tag = "FastForwardTeam/FastForward" -src.use_commit = true -fetch.url = "https://github.com/FastForwardTeam/FastForward/releases/download/$ver/fastforwardteam-$ver.xpi" - # nix-prefetch doesnt work with git right now for some reason, whatever [atf-bpir3] src.git = "https://github.com/frank-w/u-boot.git"