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

aa1a1e82efa8921fa120662da960cdaf381c4680 · 6.2 KB · 201 lines raw

1 { config, pkgs, mozff, ...}:
2
3 let
4
5 wrapped-ff-nightly = pkgs.wrapFirefox mozff.packages.${pkgs.system}.firefox-nightly-bin {
6 extraPolicies = import ./policies.nix;
7 };
8
9 in
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 {
73 overflow: hidden;
74 transition: 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
90 See 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;
102 position: relative;
103 min-width: var(--uc-sidebar-width) !important;
104 width: 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{
119 overflow: hidden;
120 color: var(--chrome-color, inherit) !important;
121 padding-inline: 0 !important;
122 }
123
124 #sidebar-header::before,
125 #sidebar-header::after{
126 content: \"\";
127 display: flex;
128 padding-left: 8px;
129 }
130
131 #sidebar-header,
132 #sidebar{
133 transition: 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{
139 min-width: var(--uc-sidebar-hover-width) !important;
140 transition-delay: 0ms !important;
141 }
142
143 .sidebar-panel{
144 background-color: transparent !important;
145 color: var(--newtab-text-primary-color) !important;
146 }
147
148 .sidebar-panel #search-box{
149 -moz-appearance: none !important;
150 background-color: rgba(249,249,250,0.1) !important;
151 color: inherit !important;
152 }
153
154 /* Add sidebar divider and give it background */
155
156 #sidebar,
157 #sidebar-header{
158 background-color: inherit !important;
159 border-inline: 1px solid rgb(80,80,80);
160 border-inline-width: 0px 1px;
161 }
162
163 #sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
164 #sidebar-box[positionend] > *{
165 border-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{
171 inset-inline: auto 0px !important;
172 }
173 #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{
174 margin-inline: 0px !important;
175 border-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\"] {
180 transform: translateX(0px) !important;
181 transition-delay: 0ms !important;
182 }
183
184 #sidebar-box [id=\"sidebar-icon\"] {
185 transform: translateX(9px);
186 transition: 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\"] {
190 visibility: hidden !important;
191 transition: 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\"] {
195 visibility: visible !important;
196 transition-delay: 0ms !important;
197 }
198 ";
199 };
200 };
201 }