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