WIP: Switch to ungoogled-chromium #9

Draft
wymiller wants to merge 3 commits from chromium-switch into master
Showing only changes of commit cf6aab2897 - Show all commits

View File

@ -2,8 +2,16 @@
pkgs,
lib,
...
}: let
}: {
programs.firefox = {
# please see Mozilla's TOU and privacy policy please i implore you
enable = false;
};
programs.chromium = {
enable = pkgs.stdenv.isLinux;
package = pkgs.ungoogled-chromium;
extensions = let
createChromiumExtensionFor = browserVersion: {
id,
sha256,
@ -17,42 +25,14 @@
};
inherit version;
};
createChromiumExtension = createChromiumExtensionFor (lib.versions.major package.version);
extensions = [
createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version);
in [
(createChromiumExtension {
# ublock origin
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
sha256 = "sha256-u81DNkZw/LBVyjk5nmrrJEVjdc+GFCay+rQZGpDH3jA=";
version = "1.37.2";
})
(createChromiumExtension {
# dark reader
id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
sha256 = "sha256-JcM2Ki3cTWdskFEFs2jk6LQUTFOojkBf+6HqO1GPK90=";
version = "4.9.34";
sha256 = "sha256:0ycnkna72n969crgxfy2lc1qbndjqrj46b9gr5l9b7pgfxi5q0ll";
version = "1.62.0";
})
];
in {
programs.firefox = {
enable = pkgs.stdenv.isLinux;
};
programs.chromium = {
enable = pkgs.stdenv.isLinux;
package = package;
enableWidevine = true;
inherit extensions;
extraOpts = {
ExtensionSettings = builtins.listToAttrs (map
(extension: {
name = extension.id;
value = {
installation_mode = "force_installed";
update_url = "https://clients2.google.com/service/update2/crx";
};
})
extensions);
};
};
}