From aa1a1e82efa8921fa120662da960cdaf381c4680 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Mon, 3 Mar 2025 13:15:12 -0500 Subject: updates to channels, new cursor, probably other fixes idk --- .../nix-home-manager/firefox-nightly/default.nix | 201 +++++++++++++ .../firefox-nightly/default.nixold | 206 +++++++++++++ .../nix-home-manager/firefox-nightly/policies.nix | 130 +++++++++ home-config/nix-home-manager/flake.lock | 160 +++++++++- home-config/nix-home-manager/flake.nix | 15 +- home-config/nix-home-manager/home.nix | 323 +-------------------- 6 files changed, 701 insertions(+), 334 deletions(-) create mode 100644 home-config/nix-home-manager/firefox-nightly/default.nix create mode 100644 home-config/nix-home-manager/firefox-nightly/default.nixold create mode 100644 home-config/nix-home-manager/firefox-nightly/policies.nix (limited to 'home-config/nix-home-manager') diff --git a/home-config/nix-home-manager/firefox-nightly/default.nix b/home-config/nix-home-manager/firefox-nightly/default.nix new file mode 100644 index 0000000..d341348 --- /dev/null +++ b/home-config/nix-home-manager/firefox-nightly/default.nix @@ -0,0 +1,201 @@ +{ config, pkgs, mozff, ...}: + +let + +wrapped-ff-nightly = pkgs.wrapFirefox mozff.packages.${pkgs.system}.firefox-nightly-bin { + extraPolicies = import ./policies.nix; +}; + +in + +{ + programs.firefox = { + enable = true; + package = mozff.packages.${pkgs.system}.firefox-nightly-bin; + policies = import ./policies.nix; + + profiles.${config.home.username} = { + name = "${config.home.username}"; + isDefault = true; + containersForce = true; + containers = { + rit = { + name = "RIT"; + color = "orange"; + icon = "dollar"; + id = 1; + }; + ritwork = { + name = "RIT Work"; + color = "green"; + icon = "briefcase"; + id = 2; + }; + other = { + name = "Other"; + color = "blue"; + icon = "fingerprint"; + id = 3; + }; + }; + search = { + force = true; + default = "DuckDuckGo"; + order = ["DuckDuckGo" "Google"]; + engines = { + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@np"]; + }; + }; + }; + userChrome = " +#main-window .toolbar-items { +overflow: hidden; +transition: height 0.3s 0.3s !important; +} +/* Default state: Set initial height to enable animation */ +#main-window .toolbar-items { height: 3em !important; } +#main-window .titlebar-button { height: 3em !important; } +#main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; } +#main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; } +/* Hidden state: Hide native tabs strip */ +#main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; } +#main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; } +/* Hidden state: Fix z-index of active pinned tabs */ +#main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; } + +/* Sidebery expand on mouse-over and hide otherwise */ + +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* Show sidebar only when the cursor is over it */ +/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */ + +#sidebar-box{ +--uc-sidebar-width: 60px; +--uc-sidebar-hover-width: 230px; +--uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */ +--uc-autohide-transition-duration: 115ms; +--uc-autohide-transition-type: linear; +--browser-area-z-index-sidebar: 3; +position: relative; + min-width: var(--uc-sidebar-width) !important; +width: var(--uc-sidebar-width) !important; + max-width: var(--uc-sidebar-width) !important; + z-index: var(--browser-area-z-index-sidebar,3); +} +#sidebar-box[positionend]{ direction: rtl } +#sidebar-box[positionend] > *{ direction: ltr } + +#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr } +#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl } + +#main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; } + +#sidebar-splitter{ display: none } + +#sidebar-header{ +overflow: hidden; +color: var(--chrome-color, inherit) !important; + padding-inline: 0 !important; +} + +#sidebar-header::before, +#sidebar-header::after{ +content: \"\"; +display: flex; + padding-left: 8px; +} + +#sidebar-header, +#sidebar{ +transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; + min-width: var(--uc-sidebar-width) !important; + will-change: min-width; +} +#sidebar-box:hover > #sidebar-header, +#sidebar-box:hover > #sidebar{ +min-width: var(--uc-sidebar-hover-width) !important; +transition-delay: 0ms !important; +} + +.sidebar-panel{ +background-color: transparent !important; +color: var(--newtab-text-primary-color) !important; +} + +.sidebar-panel #search-box{ +-moz-appearance: none !important; +background-color: rgba(249,249,250,0.1) !important; +color: inherit !important; +} + +/* Add sidebar divider and give it background */ + +#sidebar, +#sidebar-header{ +background-color: inherit !important; +border-inline: 1px solid rgb(80,80,80); +border-inline-width: 0px 1px; +} + +#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl), +#sidebar-box[positionend] > *{ +border-inline-width: 1px 0px; +} + +/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */ + +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ +inset-inline: auto 0px !important; +} +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ +margin-inline: 0px !important; +border-left-style: solid !important; +} + +/* Remove the tabs label and move the Sidebary icon to the center of the box */ +#sidebar-box:hover [id=\"sidebar-icon\"] { +transform: translateX(0px) !important; + transition-delay: 0ms !important; +} + +#sidebar-box [id=\"sidebar-icon\"] { +transform: translateX(9px); +transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; +} + +#sidebar-box [id=\"sidebar-title\"] { +visibility: hidden !important; +transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; +} + +#sidebar-box:hover [id=\"sidebar-title\"] { +visibility: visible !important; + transition-delay: 0ms !important; +} +"; +}; +}; +} diff --git a/home-config/nix-home-manager/firefox-nightly/default.nixold b/home-config/nix-home-manager/firefox-nightly/default.nixold new file mode 100644 index 0000000..543d57c --- /dev/null +++ b/home-config/nix-home-manager/firefox-nightly/default.nixold @@ -0,0 +1,206 @@ +{ config, pkgs, ...}: + +let + +wrapped-ff-nightly = pkgs.latest.firefox-nightly-bin.firefox-bin-unwrapped.overrideAttrs (oldAttrs: rec { + policies = import ./policies.nix; + policiesJson = pkgs.writeText "firefox-policies.json" (builtins.toJSON { inherit policies; }); + postFixup = '' + # See: https://github.com/mozilla/policy-templates/blob/master/README.md + mkdir -p "$out/lib/firefox/distribution" + ln -s ${policiesJson} "$out/lib/firefox-nightly-bin-${oldAttrs.version}/distribution/policies.json" + ''; +}); + +in + +{ + programs.firefox = { + enable = true; + package = wrapped-ff-nightly; + + profiles.${config.home.username} = { + name = "${config.home.username}"; + isDefault = true; + containersForce = true; + containers = { + rit = { + name = "RIT"; + color = "orange"; + icon = "dollar"; + id = 1; + }; + ritwork = { + name = "RIT Work"; + color = "green"; + icon = "briefcase"; + id = 2; + }; + other = { + name = "Other"; + color = "blue"; + icon = "fingerprint"; + id = 3; + }; + }; + search = { + force = true; + default = "DuckDuckGo"; + order = ["DuckDuckGo" "Google"]; + engines = { + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@np"]; + }; + }; + }; + userChrome = " +#main-window .toolbar-items { +overflow: hidden; +transition: height 0.3s 0.3s !important; +} +/* Default state: Set initial height to enable animation */ +#main-window .toolbar-items { height: 3em !important; } +#main-window .titlebar-button { height: 3em !important; } +#main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; } +#main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; } +/* Hidden state: Hide native tabs strip */ +#main-window[titlepreface*=\"\"] .toolbar-items { height: 0 !important; } +#main-window[titlepreface*=\"\"] .titlebar-button { height: 0 !important; } +/* Hidden state: Fix z-index of active pinned tabs */ +#main-window[titlepreface*=\"\"] #tabbrowser-tabs { z-index: 0 !important; } + +/* Sidebery expand on mouse-over and hide otherwise */ + +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* Show sidebar only when the cursor is over it */ +/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */ + +#sidebar-box{ +--uc-sidebar-width: 60px; +--uc-sidebar-hover-width: 230px; +--uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */ +--uc-autohide-transition-duration: 115ms; +--uc-autohide-transition-type: linear; +--browser-area-z-index-sidebar: 3; +position: relative; + min-width: var(--uc-sidebar-width) !important; +width: var(--uc-sidebar-width) !important; + max-width: var(--uc-sidebar-width) !important; + z-index: var(--browser-area-z-index-sidebar,3); +} +#sidebar-box[positionend]{ direction: rtl } +#sidebar-box[positionend] > *{ direction: ltr } + +#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr } +#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl } + +#main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; } + +#sidebar-splitter{ display: none } + +#sidebar-header{ +overflow: hidden; +color: var(--chrome-color, inherit) !important; + padding-inline: 0 !important; +} + +#sidebar-header::before, +#sidebar-header::after{ +content: \"\"; +display: flex; + padding-left: 8px; +} + +#sidebar-header, +#sidebar{ +transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; + min-width: var(--uc-sidebar-width) !important; + will-change: min-width; +} +#sidebar-box:hover > #sidebar-header, +#sidebar-box:hover > #sidebar{ +min-width: var(--uc-sidebar-hover-width) !important; +transition-delay: 0ms !important; +} + +.sidebar-panel{ +background-color: transparent !important; +color: var(--newtab-text-primary-color) !important; +} + +.sidebar-panel #search-box{ +-moz-appearance: none !important; +background-color: rgba(249,249,250,0.1) !important; +color: inherit !important; +} + +/* Add sidebar divider and give it background */ + +#sidebar, +#sidebar-header{ +background-color: inherit !important; +border-inline: 1px solid rgb(80,80,80); +border-inline-width: 0px 1px; +} + +#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl), +#sidebar-box[positionend] > *{ +border-inline-width: 1px 0px; +} + +/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */ + +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ +inset-inline: auto 0px !important; +} +#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ +margin-inline: 0px !important; +border-left-style: solid !important; +} + +/* Remove the tabs label and move the Sidebary icon to the center of the box */ +#sidebar-box:hover [id=\"sidebar-icon\"] { +transform: translateX(0px) !important; + transition-delay: 0ms !important; +} + +#sidebar-box [id=\"sidebar-icon\"] { +transform: translateX(9px); +transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; +} + +#sidebar-box [id=\"sidebar-title\"] { +visibility: hidden !important; +transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; +} + +#sidebar-box:hover [id=\"sidebar-title\"] { +visibility: visible !important; + transition-delay: 0ms !important; +} +"; +}; +}; +} diff --git a/home-config/nix-home-manager/firefox-nightly/policies.nix b/home-config/nix-home-manager/firefox-nightly/policies.nix new file mode 100644 index 0000000..136b8b9 --- /dev/null +++ b/home-config/nix-home-manager/firefox-nightly/policies.nix @@ -0,0 +1,130 @@ +let + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; +in +{ + +EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + EmailTracking = true; +}; +UserMessaging = { + WhatsNew = false; + ExtensionRecommendations = false; + FeatureRecommendations = false; + UrlbarInterventions = false; + SkipOnboarding = true; + MoreFromMozilla = false; + Labs = false; + Locked = true; +}; +DisableAppUpdate = true; +DisableAccounts = true; +DisableFirefoxAccounts = true; +DisableFirefoxStudies = true; +DisablePocket = true; +DisableTelemetry = true; +AutofillAddressEnabled = false; +AutofillCreditCardEnabled = false; +DisableMasterPasswordCreation = true; +PasswordManagerEnabled = false; +PrimaryPassword = false; +OfferToSaveLogins = false; +NoDefaultBookmarks = true; +OverrideFirstRunPage = ""; +OverridePostUpdatePage = ""; +FirefoxHome = { + Search = true; + TopSites = true; + SponsoredTopSites = false; + Highlights = false; + Pocket = false; + SponsoredPocket = false; + Snippets = false; + Locked = true; +}; +SearchSuggestEnabled = true; +FirefoxSuggest = { + WebSuggestions = true; + SponsoredSuggestions = false; + ImproveSuggest = false; + Locked = true; +}; +PictureInPicture = lock-true; +HardwareAcceleration = true; +Certificates = { + ImportEnterpriseRoots = true; +}; +ExtensionSettings = { +#"*".installation_mode = "blocked"; +# uBlock Origin + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; +# Bitwarden + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; + installation_mode = "normal_installed"; + }; +# SponsorBlock + "sponsorBlocker@ajay.app" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; + installation_mode = "force_installed"; + }; +# DeArrow + "deArrow@ajay.app" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/dearrow/latest.xpi"; + installation_mode = "force_installed"; + }; +# Return Youtube Dislike + "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislikes/latest.xpi"; + installation_mode = "force_installed"; + }; +# Youtube Nonstop + "{0d7cafdd-501c-49ca-8ebb-e3341caaa55e}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/youtube-nonstop/latest.xpi"; + installation_mode = "force_installed"; + }; +# Sidebery + "{3c078156-979c-498b-8990-85f7987dd929}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"; + installation_mode = "normal_installed"; + }; +# TamperMonkey + "firefox@tampermonkey.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi"; + installation_mode = "force_installed"; + }; +# Floccus + "floccus@handmadeideas.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; + installation_mode = "force_installed"; + }; +}; +Preferences = { + "browser.startup.homepage" = "https://d.in.rschanz.org"; + "extensions.activeThemeID" = { + Value = "firefox-compact-dark@mozilla.org"; + Status = "locked"; + }; + "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; + "xpinstall.whitelist.required" = lock-true; + "dom.webgpu.enabled" = lock-true; + "media.eme.enabled" = lock-true; + "general.autoScroll" = lock-true; + "general.smoothScroll" = lock-true; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false; + "browser.aboutConfig.showWarning" = lock-false; +}; +} diff --git a/home-config/nix-home-manager/flake.lock b/home-config/nix-home-manager/flake.lock index 9d258f0..9316edc 100644 --- a/home-config/nix-home-manager/flake.lock +++ b/home-config/nix-home-manager/flake.lock @@ -33,6 +33,22 @@ "type": "github" } }, + "cachix": { + "locked": { + "lastModified": 1635350005, + "narHash": "sha256-tAMJnUwfaDEB2aa31jGcu7R7bzGELM9noc91L2PbVjg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1c1f5649bb9c1b0d98637c8c365228f57126f361", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-20.09", + "repo": "nixpkgs", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -49,7 +65,40 @@ "type": "github" } }, + "flake-compat_2": { + "locked": { + "lastModified": 1717312683, + "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1659877975, "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", @@ -93,17 +142,17 @@ ] }, "locked": { - "lastModified": 1736785676, - "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", + "lastModified": 1740579671, + "narHash": "sha256-Dwt/3KknOQ4bgFG5YjqDT7oWRy27rPpDjAi2P0ok1zw=", "owner": "nix-community", "repo": "home-manager", - "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", + "rev": "53c587d263f94aaf6a281745923c76bbec62bcf3", "type": "github" }, "original": { "owner": "nix-community", "repo": "home-manager", - "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", + "rev": "53c587d263f94aaf6a281745923c76bbec62bcf3", "type": "github" } }, @@ -538,9 +587,69 @@ "type": "github" } }, - "nixgl": { + "lib-aggregate": { "inputs": { "flake-utils": "flake-utils", + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1740312740, + "narHash": "sha256-z3M+zR18jGF1IIJ7Fp9LVOkEIUBhtY+65TSNq/DbgzQ=", + "owner": "nix-community", + "repo": "lib-aggregate", + "rev": "1229db6582e2ee6337d6fbc4c3c59f2ef0b6d481", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "lib-aggregate", + "type": "github" + } + }, + "mozff": { + "inputs": { + "cachix": "cachix", + "flake-compat": "flake-compat_2", + "lib-aggregate": "lib-aggregate", + "mozilla": "mozilla", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1740573223, + "narHash": "sha256-OVysWIAwSvjCabd5F3QAyNXjU7bcNQ/zNve6YS5mZh4=", + "owner": "nix-community", + "repo": "flake-firefox-nightly", + "rev": "3391372604cd3def19e6df88a51f1882aabcd59f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-firefox-nightly", + "rev": "3391372604cd3def19e6df88a51f1882aabcd59f", + "type": "github" + } + }, + "mozilla": { + "flake": false, + "locked": { + "lastModified": 1736765918, + "narHash": "sha256-oh7GSCjBGHpxaU8/gejT55mlvI3qoKObXgqyn1XR7SA=", + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "rev": "534ee26d3dbcbb9da3766c556638b9bcc3627871", + "type": "github" + }, + "original": { + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "type": "github" + } + }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -562,17 +671,32 @@ }, "nixpkgs": { "locked": { - "lastModified": 1736012469, - "narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=", + "lastModified": 1739736696, + "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", + "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d", + "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1740272720, + "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "3d8ac19b63cf9d8305eed7301e4e83ff4ce9f495", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", "type": "github" } }, @@ -605,6 +729,7 @@ "hyprland": "hyprland", "hyprlock": "hyprlock", "hyprpicker-git": "hyprpicker-git", + "mozff": "mozff", "nixgl": "nixgl", "nixpkgs": "nixpkgs", "wpaperd": "wpaperd" @@ -677,6 +802,21 @@ } }, "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -697,7 +837,7 @@ "nixpkgs" ], "rust-overlay": "rust-overlay", - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1734445299, diff --git a/home-config/nix-home-manager/flake.nix b/home-config/nix-home-manager/flake.nix index 23bdb13..b680ab9 100644 --- a/home-config/nix-home-manager/flake.nix +++ b/home-config/nix-home-manager/flake.nix @@ -3,9 +3,9 @@ inputs = { # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d"; + nixpkgs.url = "github:nixos/nixpkgs/d74a2335ac9c133d6bbec9fc98d91a77f1604c1f"; home-manager = { - url = "github:nix-community/home-manager/fc52a210b60f2f52c74eac41a8647c1573d2071d"; + url = "github:nix-community/home-manager/53c587d263f94aaf6a281745923c76bbec62bcf3"; inputs.nixpkgs.follows = "nixpkgs"; }; hyprlock = { @@ -29,16 +29,18 @@ url = "github:danyspin97/wpaperd/b0b7e66fd32dca36c431a174784a2e87af7edb77"; inputs.nixpkgs.follows = "nixpkgs"; }; - #mozff.url = "github:mozilla/nixpkgs-mozilla"; + mozff = { + url = "github:nix-community/flake-firefox-nightly/3391372604cd3def19e6df88a51f1882aabcd59f"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, home-manager, hyprland, nixgl, wpaperd, hyprpicker-git, hyprlock, ... }@inputs: + outputs = { nixpkgs, home-manager, hyprland, nixgl, wpaperd, hyprpicker-git, hyprlock, mozff, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; overlays = [ - nixgl.overlay - #mozff.overlays.firefox + #nixgl.overlay ]; in { homeConfigurations."ryan" = home-manager.lib.homeManagerConfiguration { @@ -56,6 +58,7 @@ inherit wpaperd; inherit hyprlock; inherit hyprpicker-git; + inherit mozff; }; } ]; diff --git a/home-config/nix-home-manager/home.nix b/home-config/nix-home-manager/home.nix index d7089dc..4c72beb 100644 --- a/home-config/nix-home-manager/home.nix +++ b/home-config/nix-home-manager/home.nix @@ -1,15 +1,9 @@ -{ config, pkgs, hyprland, nixgl, wpaperd, hyprpicker-git, hyprlock, ... }: - let - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; - in +{ config, pkgs, hyprland, nixgl, wpaperd, hyprpicker-git, hyprlock, mozff, ... }: + { + imports = [ + ./firefox-nightly/default.nix + ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "ryan"; @@ -40,313 +34,6 @@ # wayland.windowManager.hyprland.enable = true; - # Install firefox and add some customizations - programs.firefox = { - enable = true; - policies = { - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - EmailTracking = true; - }; - UserMessaging = { - WhatsNew = false; - ExtensionRecommendations = false; - FeatureRecommendations = false; - UrlbarInterventions = false; - SkipOnboarding = true; - MoreFromMozilla = false; - Labs = false; - Locked = true; - }; - DisableAppUpdate = true; - DisableAccounts = true; - DisableFirefoxAccounts = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - DisableMasterPasswordCreation = true; - PasswordManagerEnabled = false; - PrimaryPassword = false; - OfferToSaveLogins = false; - NoDefaultBookmarks = true; - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - FirefoxHome = { - Search = true; - TopSites = true; - SponsoredTopSites = false; - Highlights = false; - Pocket = false; - SponsoredPocket = false; - Snippets = false; - Locked = true; - }; - SearchSuggestEnabled = true; - FirefoxSuggest = { - WebSuggestions = true; - SponsoredSuggestions = false; - ImproveSuggest = false; - Locked = true; - }; - PictureInPicture = lock-true; - HardwareAcceleration = true; - Certificates = { - ImportEnterpriseRoots = true; - }; - ExtensionSettings = { - #"*".installation_mode = "blocked"; - # uBlock Origin - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - # Bitwarden - "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; - installation_mode = "normal_installed"; - }; - # SponsorBlock - "sponsorBlocker@ajay.app" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"; - installation_mode = "force_installed"; - }; - # DeArrow - "deArrow@ajay.app" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/dearrow/latest.xpi"; - installation_mode = "force_installed"; - }; - # Return Youtube Dislike - "{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislikes/latest.xpi"; - installation_mode = "force_installed"; - }; - # Youtube Nonstop - "{0d7cafdd-501c-49ca-8ebb-e3341caaa55e}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/youtube-nonstop/latest.xpi"; - installation_mode = "force_installed"; - }; - # Sidebery - "{3c078156-979c-498b-8990-85f7987dd929}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"; - installation_mode = "normal_installed"; - }; - # TamperMonkey - "firefox@tampermonkey.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi"; - installation_mode = "force_installed"; - }; - # Floccus - "floccus@handmadeideas.org" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; - installation_mode = "force_installed"; - }; - }; - Preferences = { - "browser.startup.homepage" = "https://d.in.rschanz.org"; - "extensions.activeThemeID" = { - Value = "firefox-compact-dark@mozilla.org"; - Status = "locked"; - }; - "toolkit.legacyUserProfileCustomizations.stylesheets" = lock-true; - "xpinstall.whitelist.required" = lock-true; - "dom.webgpu.enabled" = lock-true; - "media.eme.enabled" = lock-true; - "general.autoScroll" = lock-true; - "general.smoothScroll" = lock-true; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock-false; - "browser.aboutConfig.showWarning" = lock-false; - }; - }; - profiles.${config.home.username} = { - name = "${config.home.username}"; - isDefault = true; - containersForce = true; - containers = { - rit = { - name = "RIT"; - color = "orange"; - icon = "dollar"; - id = 1; - }; - ritwork = { - name = "RIT Work"; - color = "green"; - icon = "briefcase"; - id = 2; - }; - other = { - name = "Other"; - color = "blue"; - icon = "fingerprint"; - id = 3; - }; - }; - search = { - force = true; - default = "DuckDuckGo"; - order = ["DuckDuckGo" "Google"]; - engines = { - "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; - }; - }; - }; - userChrome = " - #main-window .toolbar-items { - overflow: hidden; - transition: height 0.3s 0.3s !important; - } - /* Default state: Set initial height to enable animation */ - #main-window .toolbar-items { height: 3em !important; } - #main-window .titlebar-button { height: 3em !important; } - #main-window[uidensity=\"touch\"] .toolbar-items { height: 3.35em !important; } - #main-window[uidensity=\"compact\"] .toolbar-items { height: 2.7em !important; } - /* Hidden state: Hide native tabs strip */ - #main-window[titlepreface*=\"​\"] .toolbar-items { height: 0 !important; } - #main-window[titlepreface*=\"​\"] .titlebar-button { height: 0 !important; } - /* Hidden state: Fix z-index of active pinned tabs */ - #main-window[titlepreface*=\"​\"] #tabbrowser-tabs { z-index: 0 !important; } - - /* Sidebery expand on mouse-over and hide otherwise */ - - /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0 - See the above repository for updates as well as full license text. */ - - /* Show sidebar only when the cursor is over it */ - /* The border controlling sidebar width will be removed so you'll need to modify these values to change width */ - - #sidebar-box{ - --uc-sidebar-width: 60px; - --uc-sidebar-hover-width: 230px; - --uc-autohide-sidebar-delay: 200ms; /* Wait 0.2s before hiding sidebar */ - --uc-autohide-transition-duration: 115ms; - --uc-autohide-transition-type: linear; - --browser-area-z-index-sidebar: 3; - position: relative; - min-width: var(--uc-sidebar-width) !important; - width: var(--uc-sidebar-width) !important; - max-width: var(--uc-sidebar-width) !important; - z-index: var(--browser-area-z-index-sidebar,3); - } - #sidebar-box[positionend]{ direction: rtl } - #sidebar-box[positionend] > *{ direction: ltr } - - #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr } - #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl } - - #main-window[sizemode=\"fullscreen\"] #sidebar-box{ --uc-sidebar-width: 1px; } - - #sidebar-splitter{ display: none } - - #sidebar-header{ - overflow: hidden; - color: var(--chrome-color, inherit) !important; - padding-inline: 0 !important; - } - - #sidebar-header::before, - #sidebar-header::after{ - content: \"\"; - display: flex; - padding-left: 8px; - } - - #sidebar-header, - #sidebar{ - transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; - min-width: var(--uc-sidebar-width) !important; - will-change: min-width; - } - #sidebar-box:hover > #sidebar-header, - #sidebar-box:hover > #sidebar{ - min-width: var(--uc-sidebar-hover-width) !important; - transition-delay: 0ms !important; - } - - .sidebar-panel{ - background-color: transparent !important; - color: var(--newtab-text-primary-color) !important; - } - - .sidebar-panel #search-box{ - -moz-appearance: none !important; - background-color: rgba(249,249,250,0.1) !important; - color: inherit !important; - } - - /* Add sidebar divider and give it background */ - - #sidebar, - #sidebar-header{ - background-color: inherit !important; - border-inline: 1px solid rgb(80,80,80); - border-inline-width: 0px 1px; - } - - #sidebar-box:not([positionend]) > :-moz-locale-dir(rtl), - #sidebar-box[positionend] > *{ - border-inline-width: 1px 0px; - } - - /* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */ - - #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ - inset-inline: auto 0px !important; - } - #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ - margin-inline: 0px !important; - border-left-style: solid !important; - } - - /* Remove the tabs label and move the Sidebary icon to the center of the box */ - #sidebar-box:hover [id=\"sidebar-icon\"] { - transform: translateX(0px) !important; - transition-delay: 0ms !important; - } - - #sidebar-box [id=\"sidebar-icon\"] { - transform: translateX(9px); - transition: transform var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; - } - - #sidebar-box [id=\"sidebar-title\"] { - visibility: hidden !important; - transition: visibility var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important; - } - - #sidebar-box:hover [id=\"sidebar-title\"] { - visibility: visible !important; - transition-delay: 0ms !important; - } - "; - }; -}; - programs.starship = { enable = true; settings = { -- cgit v1.2.3