home: add chrome-support

This commit is contained in:
genofire 2021-12-31 14:14:19 +01:00
parent c23a57a21a
commit 1d5c402503
1 changed files with 53 additions and 0 deletions

53
home/chrome.nix Normal file
View File

@ -0,0 +1,53 @@
{config, pkgs, lib, ...}:
let
createChromiumExtensionFor = browserVersion: { id, sha256, version }:
{
inherit id;
crxPath = builtins.fetchurl {
url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
name = "${id}.crx";
inherit sha256;
};
inherit version;
};
createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version);
in
{
programs.browserpass.browsers = [ "chromium" ];
programs.chromium = {
enable = true;
package = (pkgs.ungoogled-chromium.override {
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
];
});
extensions = [
# browserpass
(createChromiumExtension {
id = "naepdomgkenhinolocfifgehidddafch";
sha256 = "1gwy7fa1076ynaspz8rsfrp29cizgp7dk2wbznaxhbmim9ys6hkq";
version = "3.7.2";
})
# ublock origin
(createChromiumExtension {
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
sha256 = "12ps948lg91bbjxjmwb3d8590q8rf4mv7bkhzrjnnd210gbl5wxn";
version = "1.38.6";
})
# uMatrix
(createChromiumExtension {
id = "ogfcmafjalglgifnmanfmnieipoejdcf";
sha256 = "0l1i79naglp2xbqvkvrw7340749wncdql8dklrklz3b406c01cmf";
version = "1.4.4";
})
# ipvFoo
(createChromiumExtension {
id = "ecanpcehffngcegjmadlcijfolapggal";
sha256 = "11xqynrmqsxi2l52krag1cfjksw0ch4h3hrz99wf2b7h5p9l9z0g";
version = "1.44";
})
];
};
}