home-config/nix-home-manager/firefox-nightly/default.nix

b64aeaac7a6316181e8cec7eb7530c08fb9eca41 · 6.2 KB · 200 lines raw

1 { config, pkgs, mozff, ...}:
2
3 let
4
5 wrapped-ff-nightly = mozff.packages.${pkgs.system}.firefox-nightly-bin.override {
6 extraPolicies = import ./policies.nix;
7 };
8
9 in
10
11 {
12 programs.firefox = {
13 enable = true;
14 package = wrapped-ff-nightly;
15
16 profiles.${config.home.username} = {
17 name = "${config.home.username}";
18 isDefault = true;
19 containersForce = true;
20 containers = {
21 rit = {
22 name = "RIT";
23 color = "orange";
24 icon = "dollar";
25 id = 1;
26 };
27 ritwork = {
28 name = "RIT Work";
29 color = "green";
30 icon = "briefcase";
31 id = 2;
32 };
33 other = {
34 name = "Other";
35 color = "blue";
36 icon = "fingerprint";
37 id = 3;
38 };
39 };
40 search = {
41 force = true;
42 default = "DuckDuckGo";
43 order = ["DuckDuckGo" "Google"];
44 engines = {
45 "Nix Packages" = {
46 urls = [
47 {
48 template = "https://search.nixos.org/packages";
49 params = [
50 {
51 name = "type";
52 value = "packages";
53 }
54 {
55 name = "channel";
56 value = "unstable";
57 }
58 {
59 name = "query";
60 value = "{searchTerms}";
61 }
62 ];
63 }
64 ];
65 icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
66 definedAliases = ["@np"];
67 };
68 };
69 };
70 userChrome = "
71 #main-window .toolbar-items {
72 overflow: hidden;
73 transition: height 0.3s 0.3s !important;
74 }
75 /* Default state: Set initial height to enable animation */
76 #main-window .toolbar-items { height: 3em !important; }
77 #main-window .titlebar-button { height: 3em !important; }
78 #main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; }
79 #main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; }
80 /* Hidden state: Hide native tabs strip */
81 #main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; }
82 #main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; }
83 /* Hidden state: Fix z-index of active pinned tabs */
84 #main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; }
85
86 /* Sidebery expand on mouse-over and hide otherwise */
87
88 /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
89 See the above repository for updates as well as full license text. */
90
91 /* Show sidebar only when the cursor is over it */
92 /* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
93
94 #sidebar-box{
95 --uc-sidebar-width: 60px;
96 --uc-sidebar-hover-width: 230px;
97 --uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */
98 --uc-autohide-transition-duration: 115ms;
99 --uc-autohide-transition-type: linear;
100 --browser-area-z-index-sidebar: 3;
101 position: relative;
102 min-width: var(--uc-sidebar-width) !important;
103 width: var(--uc-sidebar-width) !important;
104 max-width: var(--uc-sidebar-width) !important;
105 z-index: var(--browser-area-z-index-sidebar,3);
106 }
107 #sidebar-box[positionend]{ direction: rtl }
108 #sidebar-box[positionend] > *{ direction: ltr }
109
110 #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
111 #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
112
113 #main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; }
114
115 #sidebar-splitter{ display: none }
116
117 #sidebar-header{
118 overflow: hidden;
119 color: var(--chrome-color, inherit) !important;
120 padding-inline: 0 !important;
121 }
122
123 #sidebar-header::before,
124 #sidebar-header::after{
125 content: \"\";
126 display: flex;
127 padding-left: 8px;
128 }
129
130 #sidebar-header,
131 #sidebar{
132 transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
133 min-width: var(--uc-sidebar-width) !important;
134 will-change: min-width;
135 }
136 #sidebar-box:hover > #sidebar-header,
137 #sidebar-box:hover > #sidebar{
138 min-width: var(--uc-sidebar-hover-width) !important;
139 transition-delay: 0ms !important;
140 }
141
142 .sidebar-panel{
143 background-color: transparent !important;
144 color: var(--newtab-text-primary-color) !important;
145 }
146
147 .sidebar-panel #search-box{
148 -moz-appearance: none !important;
149 background-color: rgba(249,249,250,0.1) !important;
150 color: inherit !important;
151 }
152
153 /* Add sidebar divider and give it background */
154
155 #sidebar,
156 #sidebar-header{
157 background-color: inherit !important;
158 border-inline: 1px solid rgb(80,80,80);
159 border-inline-width: 0px 1px;
160 }
161
162 #sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
163 #sidebar-box[positionend] > *{
164 border-inline-width: 1px 0px;
165 }
166
167 /* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
168
169 #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{
170 inset-inline: auto 0px !important;
171 }
172 #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{
173 margin-inline: 0px !important;
174 border-left-style: solid !important;
175 }
176
177 /* Remove the tabs label and move the Sidebary icon to the center of the box */
178 #sidebar-box:hover [id=\"sidebar-icon\"] {
179 transform: translateX(0px) !important;
180 transition-delay: 0ms !important;
181 }
182
183 #sidebar-box [id=\"sidebar-icon\"] {
184 transform: translateX(9px);
185 transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
186 }
187
188 #sidebar-box [id=\"sidebar-title\"] {
189 visibility: hidden !important;
190 transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
191 }
192
193 #sidebar-box:hover [id=\"sidebar-title\"] {
194 visibility: visible !important;
195 transition-delay: 0ms !important;
196 }
197 ";
198 };
199 };
200 }