WIP: Switch to ungoogled-chromium #9

Draft
wymiller wants to merge 3 commits from chromium-switch into master
3 changed files with 45 additions and 1 deletions

View File

@ -1,5 +1,46 @@
{pkgs, ...}: {
{
pkgs,
lib,
...
}: {
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.override {
enableWideVine = true;
commandLineArgs = [
"--enable-features=AcceleratedVideoEncoder,VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo"
"--ignore-gpu-blocklist"
"--force-dark-mode"
"--enable-zero-copy"
];
};
extensions = 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 [
(createChromiumExtension {
# ublock origin
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
sha256 = "sha256:0ycnkna72n969crgxfy2lc1qbndjqrj46b9gr5l9b7pgfxi5q0ll";
version = "1.62.0";
})
];
};
}

View File

@ -23,6 +23,7 @@ in {
./direnv.nix
./sway.nix
./terminal.nix
./browser.nix
];
# Home Manager needs a bit of information about you and the
@ -41,6 +42,7 @@ in {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
NIXOS_OZONE_WL = "1";
};
pointerCursor = lib.mkIf pkgs.stdenv.isLinux {

View File

@ -11,5 +11,6 @@
mcrcon
xfce.thunar
pavucontrol
# ungoogled-chromium
]);
}