users/ryan/linux/firefox-nightly/default.nix

397af8b5b8bf6d08f26292207ce2aaffc095772b · 6.1 KB · 193 lines raw

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