From 0239a9925c837d5a0bfbab922c984da627e56192 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:32:43 -0500 Subject: [PATCH] try to prevent unnecessary firefox rebuidl --- overlays/firefox.nix | 5 ++++ pkgs/firefox-history-exporter/manifest.json | 5 ++++ pkgs/firefox-history-exporter/package.nix | 23 ++++++------------- .../nmasur/presets/programs/firefox.nix | 2 ++ .../services/daily-summary/daily-summary.nix | 8 ------- .../modules/nmasur/presets/services/dock.nix | 6 ----- 6 files changed, 19 insertions(+), 30 deletions(-) create mode 100644 overlays/firefox.nix diff --git a/overlays/firefox.nix b/overlays/firefox.nix new file mode 100644 index 0000000..bd748b6 --- /dev/null +++ b/overlays/firefox.nix @@ -0,0 +1,5 @@ +inputs: final: prev: { + + firefox-unwrapped = final.stable.firefox-unwrapped; + +} diff --git a/pkgs/firefox-history-exporter/manifest.json b/pkgs/firefox-history-exporter/manifest.json index a92658c..34ea75f 100644 --- a/pkgs/firefox-history-exporter/manifest.json +++ b/pkgs/firefox-history-exporter/manifest.json @@ -13,5 +13,10 @@ }, "action": { "default_popup": "popup.html" + }, + "browser_specific_settings": { + "gecko": { + "id": "firefox-history-exporter@nmasur.com" + } } } diff --git a/pkgs/firefox-history-exporter/package.nix b/pkgs/firefox-history-exporter/package.nix index 5807463..5b57df9 100644 --- a/pkgs/firefox-history-exporter/package.nix +++ b/pkgs/firefox-history-exporter/package.nix @@ -1,28 +1,19 @@ { pkgs, ... }: -pkgs.stdenv.mkDerivation { +pkgs.stdenv.mkDerivation rec { pname = "firefox-history-exporter"; version = "1.0"; src = ./.; nativeBuildInputs = [ pkgs.zip ]; - # We are not building anything, just packaging. - dontBuild = true; + # We aren't building, just packaging + dontUnpack = true; - installPhase = '' - # The directory structure expected by Firefox and home-manager. - # The UUID is the official application ID for Firefox. - install_dir=$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} - mkdir -p $install_dir - - # The filename of the .xpi file serves as the extension's ID. - # An email-like format is a common convention. - extension_id="firefox-history-exporter@localhost.xpi" - - # Go into the source directory and zip all files into the .xpi archive. - # This ensures the manifest.json is at the root of the archive. - (cd $src; zip $install_dir/$extension_id *) + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + (cd ${src}; zip "$dst/firefox-history-exporter@nmasur.com.xpi" manifest.json background.js popup.html popup.js) ''; meta = with pkgs.lib; { diff --git a/platforms/home-manager/modules/nmasur/presets/programs/firefox.nix b/platforms/home-manager/modules/nmasur/presets/programs/firefox.nix index fad9e98..19cefac 100644 --- a/platforms/home-manager/modules/nmasur/presets/programs/firefox.nix +++ b/platforms/home-manager/modules/nmasur/presets/programs/firefox.nix @@ -47,6 +47,7 @@ in vimium wappalyzer # TODO: only for work profile pkgs.nmasur.firefox-history-exporter + copy-as-markdown # saml-tracer # text-fragment ]; @@ -62,6 +63,7 @@ in "trailhead.firstrun.didSeeAboutWelcome" = true; # Disable welcome splash "dom.forms.autocomplete.formautofill" = false; # Disable autofill "extensions.formautofill.creditCards.enabled" = false; # Disable credit cards + "extensions.autoDisableScopes" = false; # Enable extensions automatically "dom.payments.defaults.saveAddress" = false; # Disable address save "general.autoScroll" = true; # Drag middle-mouse to scroll "services.sync.prefs.sync.general.autoScroll" = false; # Prevent disabling autoscroll diff --git a/platforms/nix-darwin/modules/nmasur/presets/services/daily-summary/daily-summary.nix b/platforms/nix-darwin/modules/nmasur/presets/services/daily-summary/daily-summary.nix index 8711443..d82cc26 100644 --- a/platforms/nix-darwin/modules/nmasur/presets/services/daily-summary/daily-summary.nix +++ b/platforms/nix-darwin/modules/nmasur/presets/services/daily-summary/daily-summary.nix @@ -45,14 +45,6 @@ in # Runs the script through /bin/sh automatically # RunAtLoad = true; StartCalendarInterval = [ - { - Hour = 11; - Minute = 45; - } - { - Hour = 3; - Minute = 45; - } { Hour = 4; Minute = 45; diff --git a/platforms/nix-darwin/modules/nmasur/presets/services/dock.nix b/platforms/nix-darwin/modules/nmasur/presets/services/dock.nix index 774a72b..323e83e 100644 --- a/platforms/nix-darwin/modules/nmasur/presets/services/dock.nix +++ b/platforms/nix-darwin/modules/nmasur/presets/services/dock.nix @@ -15,12 +15,6 @@ in config = lib.mkIf cfg.enable { - nixpkgs.overlays = [ - (_final: _prev: { - firefox-unwrapped = pkgs.stable.firefox-unwrapped; - }) - ]; - system.defaults.CustomUserPreferences = { "com.apple.dock" = { magnification = true;