firefox attempt #53782

This commit is contained in:
jacekpoz 2023-07-22 00:16:44 +02:00
parent f2482b8b87
commit e9d4c68ea4

View file

@ -1,15 +1,48 @@
{
config,
lib,
pkgs,
...
}: {
config = {
config = let
buildFirefoxXpiAddon = lib.makeOverridable ({
stdenv ? pkgs.stdenv,
fetchurl ? pkgs.fetchurl,
pname,
version,
addonId,
url,
sha256,
...
}:
stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {inherit url sha256;};
preferLocalBuild = true;
allowSubstitutes = true;
buildCommand = ''
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9397384}"
mkdir -p "$dst"
install -v -m644 "$src" "$dst/${addonId}.xpi"
'';
});
extra-addons = {
yomichan = buildFirefoxXpiAddon {
pname = "yomichan";
version = "20.5.22.1";
addonId = "{a9226ee9-7998-47bd-b72e-a1b56df7f77b}";
url = "https://addons.mozilla.org/firefox/downloads/file/3585060/yomichan-20.5.22.1.xpi";
sha256 = "";
};
};
in {
programs.firefox = {
enable = true;
package = pkgs.firefox-devedition;
profiles = {
"schizo.dev-edition-default" = {
id = 1;
id = 0;
name = "default";
isDefault = true;
search = {
@ -51,9 +84,17 @@
};
force = true;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
];
#extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# ublock-origin
# sponsorblock
# tridactyl
# violentmonkey
# darkreader
# keepassxc-browser
# redirector
# auto-tab-discard
# extra-addons.yomichan
#];
};
};
};