summaryrefslogtreecommitdiff
path: root/home-config/nix-home-manager/firefox-nightly
diff options
context:
space:
mode:
Diffstat (limited to 'home-config/nix-home-manager/firefox-nightly')
-rw-r--r--home-config/nix-home-manager/firefox-nightly/default.nix201
-rw-r--r--home-config/nix-home-manager/firefox-nightly/default.nixold206
-rw-r--r--home-config/nix-home-manager/firefox-nightly/policies.nix130
3 files changed, 537 insertions, 0 deletions
diff --git a/home-config/nix-home-manager/firefox-nightly/default.nix b/home-config/nix-home-manager/firefox-nightly/default.nix
new file mode 100644
index 0000000..d341348
--- /dev/null
+++ b/home-config/nix-home-manager/firefox-nightly/default.nix
@@ -0,0 +1,201 @@
1{ config, pkgs, mozff, ...}:
2
3let
4
5wrapped-ff-nightly = pkgs.wrapFirefox mozff.packages.${pkgs.system}.firefox-nightly-bin {
6 extraPolicies = import ./policies.nix;
7};
8
9in
10
11{
12 programs.firefox = {
13 enable = true;
14 package = mozff.packages.${pkgs.system}.firefox-nightly-bin;
15 policies = import ./policies.nix;
16
17 profiles.${config.home.username} = {
18 name = "${config.home.username}";
19 isDefault = true;
20 containersForce = true;
21 containers = {
22 rit = {
23 name = "RIT";
24 color = "orange";
25 icon = "dollar";
26 id = 1;
27 };
28 ritwork = {
29 name = "RIT Work";
30 color = "green";
31 icon = "briefcase";
32 id = 2;
33 };
34 other = {
35 name = "Other";
36 color = "blue";
37 icon = "fingerprint";
38 id = 3;
39 };
40 };
41 search = {
42 force = true;
43 default = "DuckDuckGo";
44 order = ["DuckDuckGo" "Google"];
45 engines = {
46 "Nix Packages" = {
47 urls = [
48 {
49 template = "https://search.nixos.org/packages";
50 params = [
51 {
52 name = "type";
53 value = "packages";
54 }
55 {
56 name = "channel";
57 value = "unstable";
58 }
59 {
60 name = "query";
61 value = "{searchTerms}";
62 }
63 ];
64 }
65 ];
66 icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
67 definedAliases = ["@np"];
68 };
69 };
70 };
71 userChrome = "
72#main-window .toolbar-items {
73overflow: hidden;
74transition: height 0.3s 0.3s !important;
75}
76/* Default state: Set initial height to enable animation */
77#main-window .toolbar-items { height: 3em !important; }
78#main-window .titlebar-button { height: 3em !important; }
79#main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; }
80#main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; }
81/* Hidden state: Hide native tabs strip */
82#main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; }
83#main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; }
84/* Hidden state: Fix z-index of active pinned tabs */
85#main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; }
86
87/* Sidebery expand on mouse-over and hide otherwise */
88
89/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
90See the above repository for updates as well as full license text. */
91
92/* Show sidebar only when the cursor is over it */
93/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
94
95#sidebar-box{
96--uc-sidebar-width: 60px;
97--uc-sidebar-hover-width: 230px;
98--uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */
99--uc-autohide-transition-duration: 115ms;
100--uc-autohide-transition-type: linear;
101--browser-area-z-index-sidebar: 3;
102position: relative;
103 min-width: var(--uc-sidebar-width) !important;
104width: var(--uc-sidebar-width) !important;
105 max-width: var(--uc-sidebar-width) !important;
106 z-index: var(--browser-area-z-index-sidebar,3);
107}
108#sidebar-box[positionend]{ direction: rtl }
109#sidebar-box[positionend] > *{ direction: ltr }
110
111#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
112#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
113
114#main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; }
115
116#sidebar-splitter{ display: none }
117
118#sidebar-header{
119overflow: hidden;
120color: var(--chrome-color, inherit) !important;
121 padding-inline: 0 !important;
122}
123
124#sidebar-header::before,
125#sidebar-header::after{
126content: \"\";
127display: flex;
128 padding-left: 8px;
129}
130
131#sidebar-header,
132#sidebar{
133transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
134 min-width: var(--uc-sidebar-width) !important;
135 will-change: min-width;
136}
137#sidebar-box:hover > #sidebar-header,
138#sidebar-box:hover > #sidebar{
139min-width: var(--uc-sidebar-hover-width) !important;
140transition-delay: 0ms !important;
141}
142
143.sidebar-panel{
144background-color: transparent !important;
145color: var(--newtab-text-primary-color) !important;
146}
147
148.sidebar-panel #search-box{
149-moz-appearance: none !important;
150background-color: rgba(249,249,250,0.1) !important;
151color: inherit !important;
152}
153
154/* Add sidebar divider and give it background */
155
156#sidebar,
157#sidebar-header{
158background-color: inherit !important;
159border-inline: 1px solid rgb(80,80,80);
160border-inline-width: 0px 1px;
161}
162
163#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
164#sidebar-box[positionend] > *{
165border-inline-width: 1px 0px;
166}
167
168/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
169
170#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{
171inset-inline: auto 0px !important;
172}
173#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{
174margin-inline: 0px !important;
175border-left-style: solid !important;
176}
177
178/* Remove the tabs label and move the Sidebary icon to the center of the box */
179#sidebar-box:hover [id=\"sidebar-icon\"] {
180transform: translateX(0px) !important;
181 transition-delay: 0ms !important;
182}
183
184#sidebar-box [id=\"sidebar-icon\"] {
185transform: translateX(9px);
186transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
187}
188
189#sidebar-box [id=\"sidebar-title\"] {
190visibility: hidden !important;
191transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
192}
193
194#sidebar-box:hover [id=\"sidebar-title\"] {
195visibility: visible !important;
196 transition-delay: 0ms !important;
197}
198";
199};
200};
201}
diff --git a/home-config/nix-home-manager/firefox-nightly/default.nixold b/home-config/nix-home-manager/firefox-nightly/default.nixold
new file mode 100644
index 0000000..543d57c
--- /dev/null
+++ b/home-config/nix-home-manager/firefox-nightly/default.nixold
@@ -0,0 +1,206 @@
1{ config, pkgs, ...}:
2
3let
4
5wrapped-ff-nightly = pkgs.latest.firefox-nightly-bin.firefox-bin-unwrapped.overrideAttrs (oldAttrs: rec {
6 policies = import ./policies.nix;
7 policiesJson = pkgs.writeText "firefox-policies.json" (builtins.toJSON { inherit policies; });
8 postFixup = ''
9 # See: https://github.com/mozilla/policy-templates/blob/master/README.md
10 mkdir -p "$out/lib/firefox/distribution"
11 ln -s ${policiesJson} "$out/lib/firefox-nightly-bin-${oldAttrs.version}/distribution/policies.json"
12 '';
13});
14
15in
16
17{
18 programs.firefox = {
19 enable = true;
20 package = wrapped-ff-nightly;
21
22 profiles.${config.home.username} = {
23 name = "${config.home.username}";
24 isDefault = true;
25 containersForce = true;
26 containers = {
27 rit = {
28 name = "RIT";
29 color = "orange";
30 icon = "dollar";
31 id = 1;
32 };
33 ritwork = {
34 name = "RIT Work";
35 color = "green";
36 icon = "briefcase";
37 id = 2;
38 };
39 other = {
40 name = "Other";
41 color = "blue";
42 icon = "fingerprint";
43 id = 3;
44 };
45 };
46 search = {
47 force = true;
48 default = "DuckDuckGo";
49 order = ["DuckDuckGo" "Google"];
50 engines = {
51 "Nix Packages" = {
52 urls = [
53 {
54 template = "https://search.nixos.org/packages";
55 params = [
56 {
57 name = "type";
58 value = "packages";
59 }
60 {
61 name = "channel";
62 value = "unstable";
63 }
64 {
65 name = "query";
66 value = "{searchTerms}";
67 }
68 ];
69 }
70 ];
71 icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
72 definedAliases = ["@np"];
73 };
74 };
75 };
76 userChrome = "
77#main-window .toolbar-items {
78overflow: hidden;
79transition: height 0.3s 0.3s !important;
80}
81/* Default state: Set initial height to enable animation */
82#main-window .toolbar-items { height: 3em !important; }
83#main-window .titlebar-button { height: 3em !important; }
84#main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; }
85#main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; }
86/* Hidden state: Hide native tabs strip */
87#main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; }
88#main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; }
89/* Hidden state: Fix z-index of active pinned tabs */
90#main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; }
91
92/* Sidebery expand on mouse-over and hide otherwise */
93
94/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
95See the above repository for updates as well as full license text. */
96
97/* Show sidebar only when the cursor is over it */
98/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
99
100#sidebar-box{
101--uc-sidebar-width: 60px;
102--uc-sidebar-hover-width: 230px;
103--uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */
104--uc-autohide-transition-duration: 115ms;
105--uc-autohide-transition-type: linear;
106--browser-area-z-index-sidebar: 3;
107position: relative;
108 min-width: var(--uc-sidebar-width) !important;
109width: var(--uc-sidebar-width) !important;
110 max-width: var(--uc-sidebar-width) !important;
111 z-index: var(--browser-area-z-index-sidebar,3);
112}
113#sidebar-box[positionend]{ direction: rtl }
114#sidebar-box[positionend] > *{ direction: ltr }
115
116#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
117#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
118
119#main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; }
120
121#sidebar-splitter{ display: none }
122
123#sidebar-header{
124overflow: hidden;
125color: var(--chrome-color, inherit) !important;
126 padding-inline: 0 !important;
127}
128
129#sidebar-header::before,
130#sidebar-header::after{
131content: \"\";
132display: flex;
133 padding-left: 8px;
134}
135
136#sidebar-header,
137#sidebar{
138transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
139 min-width: var(--uc-sidebar-width) !important;
140 will-change: min-width;
141}
142#sidebar-box:hover > #sidebar-header,
143#sidebar-box:hover > #sidebar{
144min-width: var(--uc-sidebar-hover-width) !important;
145transition-delay: 0ms !important;
146}
147
148.sidebar-panel{
149background-color: transparent !important;
150color: var(--newtab-text-primary-color) !important;
151}
152
153.sidebar-panel #search-box{
154-moz-appearance: none !important;
155background-color: rgba(249,249,250,0.1) !important;
156color: inherit !important;
157}
158
159/* Add sidebar divider and give it background */
160
161#sidebar,
162#sidebar-header{
163background-color: inherit !important;
164border-inline: 1px solid rgb(80,80,80);
165border-inline-width: 0px 1px;
166}
167
168#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
169#sidebar-box[positionend] > *{
170border-inline-width: 1px 0px;
171}
172
173/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
174
175#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{
176inset-inline: auto 0px !important;
177}
178#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{
179margin-inline: 0px !important;
180border-left-style: solid !important;
181}
182
183/* Remove the tabs label and move the Sidebary icon to the center of the box */
184#sidebar-box:hover [id=\"sidebar-icon\"] {
185transform: translateX(0px) !important;
186 transition-delay: 0ms !important;
187}
188
189#sidebar-box [id=\"sidebar-icon\"] {
190transform: translateX(9px);
191transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
192}
193
194#sidebar-box [id=\"sidebar-title\"] {
195visibility: hidden !important;
196transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
197}
198
199#sidebar-box:hover [id=\"sidebar-title\"] {
200visibility: visible !important;
201 transition-delay: 0ms !important;
202}
203";
204};
205};
206}
diff --git a/home-config/nix-home-manager/firefox-nightly/policies.nix b/home-config/nix-home-manager/firefox-nightly/policies.nix
new file mode 100644
index 0000000..136b8b9
--- /dev/null
+++ b/home-config/nix-home-manager/firefox-nightly/policies.nix
@@ -0,0 +1,130 @@
1let
2 lock-false = {
3 Value = false;
4 Status = "locked";
5 };
6 lock-true = {
7 Value = true;
8 Status = "locked";
9 };
10in
11{
12
13EnableTrackingProtection = {
14 Value = true;
15 Locked = true;
16 Cryptomining = true;
17 Fingerprinting = true;
18 EmailTracking = true;
19};
20UserMessaging = {
21 WhatsNew = false;
22 ExtensionRecommendations = false;
23 FeatureRecommendations = false;
24 UrlbarInterventions = false;
25 SkipOnboarding = true;
26 MoreFromMozilla = false;
27 Labs = false;
28 Locked = true;
29};
30DisableAppUpdate = true;
31DisableAccounts = true;
32DisableFirefoxAccounts = true;
33DisableFirefoxStudies = true;
34DisablePocket = true;
35DisableTelemetry = true;
36AutofillAddressEnabled = false;
37AutofillCreditCardEnabled = false;
38DisableMasterPasswordCreation = true;
39PasswordManagerEnabled = false;
40PrimaryPassword = false;
41OfferToSaveLogins = false;
42NoDefaultBookmarks = true;
43OverrideFirstRunPage = "";
44OverridePostUpdatePage = "";
45FirefoxHome = {
46 Search = true;
47 TopSites = true;
48 SponsoredTopSites = false;
49 Highlights = false;
50 Pocket = false;
51 SponsoredPocket = false;
52 Snippets = false;
53 Locked = true;
54};
55SearchSuggestEnabled = true;
56FirefoxSuggest = {
57 WebSuggestions = true;
58 SponsoredSuggestions = false;
59 ImproveSuggest = false;
60 Locked = true;
61};
62PictureInPicture = lock-true;
63HardwareAcceleration = true;
64Certificates = {
65 ImportEnterpriseRoots = true;
66};
67ExtensionSettings = {
68#"*".installation_mode = "blocked";
69# uBlock Origin
70 "uBlock0@raymondhill.net" = {
71 install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
72 installation_mode = "force_installed";
73 };
74# Bitwarden
75 "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
76 install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
77 installation_mode = "normal_installed";
78 };
79# SponsorBlock
80 "sponsorBlocker@ajay.app" = {
81 install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
82 installation_mode = "force_installed";
83 };
84# DeArrow
85 "deArrow@ajay.app" = {
86 install_url = "https://addons.mozilla.org/firefox/downloads/latest/dearrow/latest.xpi";
87 installation_mode = "force_installed";
88 };
89# Return Youtube Dislike
90 "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = {
91 install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislikes/latest.xpi";
92 installation_mode = "force_installed";
93 };
94# Youtube Nonstop
95 "{0d7cafdd-501c-49ca-8ebb-e3341caaa55e}" = {
96 install_url = "https://addons.mozilla.org/firefox/downloads/latest/youtube-nonstop/latest.xpi";
97 installation_mode = "force_installed";
98 };
99# Sidebery
100 "{3c078156-979c-498b-8990-85f7987dd929}" = {
101 install_url = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi";
102 installation_mode = "normal_installed";
103 };
104# TamperMonkey
105 "firefox@tampermonkey.net" = {
106 install_url = "https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi";
107 installation_mode = "force_installed";
108 };
109# Floccus
110 "floccus@handmadeideas.org" = {
111 install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
112 installation_mode = "force_installed";
113 };
114};
115Preferences = {
116 "browser.startup.homepage" = "https://d.in.rschanz.org";
117 "extensions.activeThemeID" = {
118 Value = "firefox-compact-dark@mozilla.org";
119 Status = "locked";
120 };
121 "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true;
122 "xpinstall.whitelist.required" = lock-true;
123 "dom.webgpu.enabled" = lock-true;
124 "media.eme.enabled" = lock-true;
125 "general.autoScroll" = lock-true;
126 "general.smoothScroll" = lock-true;
127 "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false;
128 "browser.aboutConfig.showWarning" = lock-false;
129};
130}