From 3d022f8639b87ab738ec7d6d0c3c6fef29403188 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 21 Jun 2024 10:58:52 +0800 Subject: [PATCH] home/{firefox,thunderbird}: remove ifd --- home/applications/firefox/default.nix | 21 ++++++++++----------- home/applications/thunderbird/default.nix | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/home/applications/firefox/default.nix b/home/applications/firefox/default.nix index db2f0fc..af51ad3 100644 --- a/home/applications/firefox/default.nix +++ b/home/applications/firefox/default.nix @@ -1,19 +1,18 @@ {pkgs, ...}: { programs.firefox = { enable = true; - profiles."default" = { - extraConfig = '' - ${builtins.readFile (pkgs.fetchurl { - # FIXME: IFD + package = pkgs.firefox.override { + extraPrefsFiles = [ + (pkgs.fetchurl { url = "https://raw.githubusercontent.com/arkenfox/user.js/126.1/user.js"; hash = "sha256-XRtG0iLKh8uqbeX7Rc2H6VJwZYJoNZPBlAfZEfrSCP4="; - })} - ${builtins.readFile ./user-overrides.js} - ''; + }) + # FIXME: why I cannot use `[./user-overrides.js]`? + (pkgs.runCommand "userjs" {} '' + install -Dm644 ${./user-overrides.js} $out + '') + ]; }; - }; - - home.sessionVariables = { - MOZ_USE_XINPUT2 = "1"; + profiles."default" = {}; }; } diff --git a/home/applications/thunderbird/default.nix b/home/applications/thunderbird/default.nix index 5b7628d..025f6ba 100644 --- a/home/applications/thunderbird/default.nix +++ b/home/applications/thunderbird/default.nix @@ -1,16 +1,18 @@ {pkgs, ...}: { programs.thunderbird = { enable = true; - profiles.default = { - isDefault = true; - extraConfig = '' - ${builtins.readFile (pkgs.fetchurl { - # FIXME: IFD + package = pkgs.thunderbird.override { + extraPrefsFiles = [ + (pkgs.fetchurl { url = "https://raw.githubusercontent.com/HorlogeSkynet/thunderbird-user.js/d6b18302e46349d9924c8a76951bae6efca51501/user.js"; hash = "sha256-66B1yLQkQnydAUXD7KGt32OhWSYcdWX+BUozrgW9uAg="; - })} - ${builtins.readFile ./user-overrides.js} - ''; + }) + # FIXME: why I cannot use `[./user-overrides.js]`? + (pkgs.runCommand "userjs" {} '' + install -Dm644 ${./user-overrides.js} $out + '') + ]; }; + profiles.default.isDefault = true; }; }