diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:22:44 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2026-08-03 01:22:44 -0400 |
| commit | 0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3 (patch) | |
| tree | 6f94ff3aeea2af859c7c166e01a8e73002017893 /users/ryan/linux/firefox-nightly | |
Initial commit: combined darwin + guix-linux home-manager flake
Supersedes nix-dotfiles (darwin) and guix-dotfiles' ad-hoc
nix-home-manager flake (linux). See README.md/MIGRATION.md.
Diffstat (limited to 'users/ryan/linux/firefox-nightly')
| -rw-r--r-- | users/ryan/linux/firefox-nightly/default.nix | 193 | ||||
| -rw-r--r-- | users/ryan/linux/firefox-nightly/policies.nix | 130 |
2 files changed, 323 insertions, 0 deletions
diff --git a/users/ryan/linux/firefox-nightly/default.nix b/users/ryan/linux/firefox-nightly/default.nix new file mode 100644 index 0000000..5c3fce7 --- /dev/null +++ b/users/ryan/linux/firefox-nightly/default.nix | |||
| @@ -0,0 +1,193 @@ | |||
| 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 | } | ||
diff --git a/users/ryan/linux/firefox-nightly/policies.nix b/users/ryan/linux/firefox-nightly/policies.nix new file mode 100644 index 0000000..136b8b9 --- /dev/null +++ b/users/ryan/linux/firefox-nightly/policies.nix | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | let | ||
| 2 | lock-false = { | ||
| 3 | Value = false; | ||
| 4 | Status = "locked"; | ||
| 5 | }; | ||
| 6 | lock-true = { | ||
| 7 | Value = true; | ||
| 8 | Status = "locked"; | ||
| 9 | }; | ||
| 10 | in | ||
| 11 | { | ||
| 12 | |||
| 13 | EnableTrackingProtection = { | ||
| 14 | Value = true; | ||
| 15 | Locked = true; | ||
| 16 | Cryptomining = true; | ||
| 17 | Fingerprinting = true; | ||
| 18 | EmailTracking = true; | ||
| 19 | }; | ||
| 20 | UserMessaging = { | ||
| 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 | }; | ||
| 30 | DisableAppUpdate = true; | ||
| 31 | DisableAccounts = true; | ||
| 32 | DisableFirefoxAccounts = true; | ||
| 33 | DisableFirefoxStudies = true; | ||
| 34 | DisablePocket = true; | ||
| 35 | DisableTelemetry = true; | ||
| 36 | AutofillAddressEnabled = false; | ||
| 37 | AutofillCreditCardEnabled = false; | ||
| 38 | DisableMasterPasswordCreation = true; | ||
| 39 | PasswordManagerEnabled = false; | ||
| 40 | PrimaryPassword = false; | ||
| 41 | OfferToSaveLogins = false; | ||
| 42 | NoDefaultBookmarks = true; | ||
| 43 | OverrideFirstRunPage = ""; | ||
| 44 | OverridePostUpdatePage = ""; | ||
| 45 | FirefoxHome = { | ||
| 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 | }; | ||
| 55 | SearchSuggestEnabled = true; | ||
| 56 | FirefoxSuggest = { | ||
| 57 | WebSuggestions = true; | ||
| 58 | SponsoredSuggestions = false; | ||
| 59 | ImproveSuggest = false; | ||
| 60 | Locked = true; | ||
| 61 | }; | ||
| 62 | PictureInPicture = lock-true; | ||
| 63 | HardwareAcceleration = true; | ||
| 64 | Certificates = { | ||
| 65 | ImportEnterpriseRoots = true; | ||
| 66 | }; | ||
| 67 | ExtensionSettings = { | ||
| 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 | }; | ||
| 115 | Preferences = { | ||
| 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 | } | ||
