chrome.nix 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. let
  2. ungoogledFlags = [
  3. "--disable-search-engine-collection"
  4. "--extension-mime-request-handling=always-prompt-for-install"
  5. "--fingerprinting-canvas-image-data-noise"
  6. "--fingerprinting-canvas-measuretext-noise"
  7. "--fingerprinting-client-rects-noise"
  8. "--popups-to-tabs"
  9. "--show-avatar-button=incognito-and-guest"
  10. ];
  11. experimentalFeatures = [
  12. "BackForwardCache:enable_same_site/true"
  13. "CopyLinkToText"
  14. "OverlayScrollbar"
  15. "TabHoverCardImages"
  16. "VaapiVideoDecoder"
  17. ];
  18. aestheticsFlags = [
  19. "--force-dark-mode"
  20. ];
  21. performanceFlags = [
  22. "--enable-gpu-rasterization"
  23. "--enable-oop-rasterization"
  24. "--enable-zero-copy"
  25. "--ignore-gpu-blocklist"
  26. ];
  27. waylandFlags = [
  28. # "--use-gl=egl"
  29. # "--ozone-platform=wayland"
  30. # "--enable-features=UseOzonePlatform"
  31. ];
  32. in
  33. final: prev: {
  34. ungoogled-chromium = prev.ungoogled-chromium.override {
  35. nss = final.nss_latest;
  36. commandLineArgs = toString (
  37. ungoogledFlags
  38. ++ ["--enable-features=${final.lib.concatStringsSep "," experimentalFeatures}"]
  39. ++ aestheticsFlags
  40. ++ performanceFlags
  41. ++ waylandFlags
  42. );
  43. };
  44. google-chrome-dev = prev.google-chrome-dev.override {
  45. nss = final.nss_latest;
  46. commandLineArgs = toString (
  47. ungoogledFlags
  48. ++ ["--enable-features=${final.lib.concatStringsSep "," experimentalFeatures}"]
  49. ++ aestheticsFlags
  50. ++ performanceFlags
  51. ++ waylandFlags
  52. );
  53. };
  54. }