nixos-configs/home-manager/firefox/custom-addons.nix

93 lines
3.4 KiB
Nix
Raw Permalink Normal View History

2024-10-26 18:33:47 +00:00
pkgs: lib: let
2023-10-08 14:57:57 +00:00
# Stolen from: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/default.nix
2024-10-26 18:33:47 +00:00
buildFirefoxXpiAddon = lib.makeOverridable ({
stdenv ? pkgs.stdenv,
fetchurl ? pkgs.fetchurl,
pname,
version,
addonId,
url,
sha256,
meta,
...
}:
2023-11-05 17:49:51 +00:00
stdenv.mkDerivation {
name = "${pname}-${version}";
2023-10-08 14:57:57 +00:00
2023-11-05 17:49:51 +00:00
inherit meta;
2023-10-08 14:57:57 +00:00
2024-10-26 18:33:47 +00:00
src = fetchurl {inherit url sha256;};
2023-10-08 14:57:57 +00:00
2023-11-05 17:49:51 +00:00
preferLocalBuild = true;
allowSubstitutes = true;
2023-10-08 14:57:57 +00:00
2023-11-05 17:49:51 +00:00
buildCommand = ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
mkdir -p "$dst"
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
});
in {
"http-version-indicator" = buildFirefoxXpiAddon {
pname = "http-version-indicator";
version = "3.2.1";
addonId = "spdyindicator@chengsun.github.com";
2024-10-26 18:33:47 +00:00
url = "https://addons.mozilla.org/firefox/downloads/file/3767224/http2_indicator-3.2.1.xpi";
2023-11-05 17:49:51 +00:00
sha256 = "be9518017334ce502a1da514542c2ca4f974217d0c8e6c7c31d518aba57c09a8";
meta = with lib; {
homepage = "https://github.com/bsiegel/http-version-indicator";
2024-10-26 18:33:47 +00:00
description = "An indicator showing the HTTP version used to load the page in the address bar.";
mozPermissions = ["<all_urls>" "tabs" "webNavigation" "webRequest"];
2023-11-05 17:49:51 +00:00
platforms = platforms.all;
};
};
"indicatetls" = buildFirefoxXpiAddon {
pname = "indicatetls";
version = "0.3.0";
addonId = "{252ee273-8c8d-4609-b54d-62ae345be0a1}";
2024-10-26 18:33:47 +00:00
url = "https://addons.mozilla.org/firefox/downloads/file/3608595/indicatetls-0.3.0.xpi";
2023-11-05 17:49:51 +00:00
sha256 = "7a3b7edb1085f7b15d279c1013fac1d68f5247cfd6312d5275cb053e24a79465";
meta = with lib; {
homepage = "https://github.com/jannispinter/indicatetls";
2024-10-26 18:33:47 +00:00
description = "Displays negotiated SSL/TLS protocol version and additional security information in the address bar";
2023-11-05 17:49:51 +00:00
license = licenses.mpl20;
mozPermissions = [
"tabs"
"webNavigation"
"webRequest"
"webRequestBlocking"
"http://*/*"
"https://*/*"
];
platforms = platforms.all;
};
};
"sixindicator" = buildFirefoxXpiAddon {
pname = "sixindicator";
version = "1.3.0";
addonId = "{8c9cad02-c069-4e93-909d-d874da819c49}";
2024-10-26 18:33:47 +00:00
url = "https://addons.mozilla.org/firefox/downloads/file/3493442/sixindicator-1.3.0.xpi";
2023-11-05 17:49:51 +00:00
sha256 = "415ab83ed4ac94d1efe114752a09df29536d1bd54cc9b7e5ce5d9ee55a84226d";
meta = with lib; {
homepage = "https://github.com/HostedDinner/SixIndicator";
2024-10-26 18:33:47 +00:00
description = "Shows a simple icon, if IPv6 or IPv4 was used for the request of the site. When clicking on the icon, more information is shown, like the number of requests per domain and if these requests were made via IPv6 or IPv4.";
2023-11-05 17:49:51 +00:00
license = licenses.mit;
2024-10-26 18:33:47 +00:00
mozPermissions = ["tabs" "webRequest" "<all_urls>"];
2023-11-05 17:49:51 +00:00
platforms = platforms.all;
};
};
"simple-style-fox-2" = buildFirefoxXpiAddon {
pname = "simple-style-fox-2";
version = "10.0";
addonId = "{317526c6-ff2b-49c9-822e-d77b4a3da1d1}";
2024-10-26 18:33:47 +00:00
url = "https://addons.mozilla.org/firefox/downloads/file/3934220/simple_style_fox_2-10.0.xpi";
2023-11-05 17:49:51 +00:00
sha256 = "1aaac3ba08d21086d7087015f92a27661940df45a97bf5680588c883f799a97d";
meta = with lib; {
description = "Simple style fox 2";
license = licenses.cc-by-30;
2024-10-26 18:33:47 +00:00
mozPermissions = [];
2023-11-05 17:49:51 +00:00
platforms = platforms.all;
};
};
}