1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
{
lib,
config,
...
}: let
cfg = config.collinux.desktop.programs.firefox;
in
lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
policies = {
PasswordManagerEnabled = false; # use bitwarden instead
DisableAccounts = true;
DisablePocket = true;
NoDefaultBookmarks = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
Homepage = "";
NewTabPage = false;
Preferences = let
opt = Value: {
inherit Value;
Status = "locked";
};
in {
"toolkit.legacyUserProfileCustomizations.stylesheets" = opt true;
"browser.tabs.inTitlebar" = opt 0;
"browser.tabs.hoverPreview.enabled" = opt 0;
"browser.tabs.loadBookmarksInTabs" = opt true;
"browser.toolbars.bookmarks.visibility" = opt "never";
"browser.uiCustomization.state" = opt (lib.replaceStrings ["\n" " "] ["" ""] ''
{
"placements": {
"widget-overflow-fixed-list": [],
"unified-extensions-area": [
"zotero_chnm_gmu_edu-browser-action",
"addon_darkreader_org-browser-action",
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
],
"nav-bar": [
"personal-bookmarks",
"customizableui-special-spring1",
"back-button",
"forward-button",
"stop-reload-button",
"urlbar-container",
"downloads-button",
"unified-extensions-button",
"ublock0_raymondhill_net-browser-action",
"customizableui-special-spring2"
],
"toolbar-menubar": [
"menubar-items"
],
"TabsToolbar": [
"tabbrowser-tabs",
"new-tab-button"
],
"vertical-tabs": [],
"PersonalToolbar": []
},
"seen": [
"developer-button",
"zotero_chnm_gmu_edu-browser-action",
"addon_darkreader_org-browser-action",
"ublock0_raymondhill_net-browser-action",
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action",
"screenshot-button"
],
"dirtyAreaCache": [],
"currentVersion": 23,
"newElementCount": 2
}
'');
"accessibility.force_disabled" = opt 1;
"browser.aboutConfig.showWarning" = opt false;
"startup.homepage_welcome_url" = opt "";
"trailhead.firstrun.didSeeAboutWelcome" = opt true;
"datareporting.policy.dataSubmissionPolicyBypassNotification" = opt true;
"browser.startup.homepage" = opt "about:blank";
"browser.compactmode.show" = opt true;
"browser.uidensity" = opt 1;
"media.webspeech.synth.enabled" = opt false; # im not disabled
"media.webspeech.synth.dont_notify_on_error" = opt true;
# get that AI out of my browser
"browser.ml.chat.enabled" = opt false;
"browser.ml.enable" = opt false;
};
ExtensionSettings = let
ext = name: {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
};
in
{
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = ext "bitwarden-password-manager";
"uBlock0@raymondhill.net" = ext "uBlock0@raymondhill.net";
"addon@darkreader.org" = ext "addon@darkreader.org";
}
// (lib.optionalAttrs (cfg.theme == "catppuccin") {
"{88b098c8-19be-421e-8ffa-85ddd1f3f004}" = ext "catppuccin-mocha-blue";
})
// (lib.optionalAttrs (cfg.extensions.zotero.enable) {
"zotero@chnm.gmu.edu" = {
installation_mode = "force_installed";
install_url = "https://download.zotero.org/connector/firefox/release/Zotero_Connector-5.0.181.xpi";
};
});
};
};
services.speechd.enable = lib.mkForce false; # gets installed by firefox, but we don't need it
}
|