···
1
+
# https://github.com/isabelroses/dotfiles/blob/ed6d3765ffb7dcfe67540f111f23d51a0d9617d5/modules/home/programs/chromium.nix#L16
options.myHome.programs.chromium.enable = lib.mkEnableOption "chromium web browser";
config = lib.mkIf config.myHome.programs.chromium.enable {
···
{id = "ddkjiahejlhfcafbddmgiahcphecmpfh";} # ublock origin lite
15
-
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
{id = "mdjildafknihdffpkfmmpnpoiajfjnjd";} # consent-o-matic
{id = "clngdbkpkpeebahjckkjfobafhncgmne";} # stylus
{id = "oboonakemofpalcgghocfoadofidjkkk";} # keepassxc
···
44
-
if pkgs.stdenv.isDarwin
45
-
then (pkgs.runCommand "chromium-0.0.0" {} "mkdir $out")
46
-
# else pkgs.chromium;
47
-
else pkgs.ungoogled-chromium;
50
+
package = pkgs.chromium.override {
51
+
enableWideVine = true;
53
+
# https://github.com/secureblue/hardened-chromium
54
+
# https://github.com/secureblue/secureblue/blob/e500f078efc5748d5033a881bbbcdcd2de95a813/files/system/usr/etc/chromium/chromium.conf.md
55
+
commandLineArgs = concatLists [
49
-
commandLineArgs = lib.mkIf pkgs.stdenv.isLinux [
50
-
"--enable-features=TouchpadOverscrollHistoryNavigation"
63
+
(enableFeature true "gpu-rasterization")
64
+
(enableFeature true "oop-rasterization")
65
+
(enableFeature true "zero-copy")
66
+
"--ignore-gpu-blocklist"
71
+
"--ozone-platform=wayland"
72
+
"--enable-features=UseOzonePlatform"
77
+
"--disk-cache=$XDG_RUNTIME_DIR/chromium-cache"
78
+
(enableFeature false "reading-from-canvas")
80
+
"--disable-wake-on-wifi"
81
+
"--disable-breakpad"
83
+
# please stop asking me to be the default browser
84
+
"--no-default-browser-check"
86
+
# I don't need these, thus I disable them
87
+
(enableFeature false "speech-api")
88
+
(enableFeature false "speech-synthesis-api")
93
+
# Use strict extension verification
94
+
"--extension-content-verification=enforce_strict"
95
+
"--extensions-install-verification=enforce_strict"
98
+
# Require HTTPS for component updater
99
+
"--component-updater=require_encryption"
100
+
# Disable crash upload
101
+
"--no-crash-upload"
102
+
# don't run things without asking
103
+
"--no-service-autorun"
108
+
"--enable-features="
109
+
+ concatMapStrings (x: x + ",") [
110
+
# Enable visited link database partitioning
111
+
"PartitionVisitedLinkDatabase"
112
+
# Enable prefetch privacy changes
113
+
"PrefetchPrivacyChanges"
114
+
# Enable split cache
115
+
"SplitCacheByNetworkIsolationKey"
116
+
"SplitCodeCacheByNetworkIsolationKey"
117
+
# Enable partitioning connections
118
+
"EnableCrossSiteFlagNetworkIsolationKey"
119
+
"HttpCacheKeyingExperimentControlGroup"
120
+
"PartitionConnectionsByNetworkIsolationKey"
121
+
# Enable strict origin isolation
122
+
"StrictOriginIsolation"
123
+
# Enable reduce accept language header
124
+
"ReduceAcceptLanguage"
125
+
# Enable content settings partitioning
126
+
"ContentSettingsPartitioning"
127
+
# i like moving pages with my touchpad...
128
+
"TouchpadOverscrollHistoryNavigation"
133
+
"--disable-features="
134
+
+ concatMapStrings (x: x + ",") [
136
+
"AutofillPaymentCardBenefits"
137
+
"AutofillPaymentCvcStorage"
138
+
"AutofillPaymentCardBenefits"
139
+
# Disable third-party cookie deprecation bypasses
140
+
"TpcdHeuristicsGrants"
141
+
"TpcdMetadataGrants"
142
+
# Disable hyperlink auditing
143
+
"EnableHyperlinkAuditing"
144
+
# Disable showing popular sites
145
+
"NTPPopularSitesBakedInContent"
146
+
"UsePopularSitesSuggestions"
147
+
# Disable article suggestions
149
+
"ArticlesListVisible"
150
+
"EnableSnippetsByDse"
151
+
# Disable content feed suggestions
153
+
# Disable media DRM preprovisioning
154
+
"MediaDrmPreprovisioning"
155
+
# Disable autofill server communication
156
+
"AutofillServerCommunication"
157
+
# Disable new privacy sandbox features
158
+
"PrivacySandboxSettings4"
160
+
"BrowsingTopicsDocumentAPI"
161
+
"BrowsingTopicsParameters"
162
+
# Disable translate button
163
+
"AdaptiveButtonInTopToolbarTranslate"
164
+
# Disable detailed language settings
165
+
"DetailedLanguageSettings"
166
+
# Disable fetching optimization guides
167
+
"OptimizationHintsFetching"
168
+
# Partition third-party storage
169
+
"DisableThirdPartyStoragePartitioningDeprecationTrial2"
171
+
# Disable media engagement
172
+
"PreloadMediaEngagementData"
173
+
"MediaEngagementBypassAutoplayPolicies"