From 133af4ac95c3e061f819ce78c6154d2aad8b7154 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 27 Oct 2022 01:37:51 +0200 Subject: workstation: Switch to Nix-managed Firefox I had this laying around locally for a year now and I'm still not really happy with some things, for example not having yet full source builds of the extensions and a few config options not yet managed by Nix (eg. search engines). However, since Firefox takes a while to build it's a bit tedious to always do it directly (and locally) after I update my machines. Having this part of my workstation profile should make sure that my version of Firefox is available at all times. Signed-off-by: aszlig --- pkgs/aszlig/firefox/update-addons.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 pkgs/aszlig/firefox/update-addons.sh (limited to 'pkgs/aszlig/firefox/update-addons.sh') diff --git a/pkgs/aszlig/firefox/update-addons.sh b/pkgs/aszlig/firefox/update-addons.sh new file mode 100755 index 00000000..4d25c503 --- /dev/null +++ b/pkgs/aszlig/firefox/update-addons.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p bash coreutils jq +for addon in ff2mpv styl-us tridactyl-vim multi-account-containers; do + url="https://addons.mozilla.org/api/v5/addons/addon/$addon/versions/" + curl -s -H 'Accept: application/json' "$url" \ + | jq --arg name "$addon" '. + {$name}' +done | jq -s ' + map({key: .name, value: .results[0].file | {url, hash}}) | from_entries +' > "$(cd "$(dirname "$0")" && pwd)/addons.json" -- cgit 1.4.1