Hi, I am trying to patch Firefox with "LegacyFox”, a shim that essentially jury-rigs Firefox into running legacy extensions, in particular VimFx.
I created an overlay to build a new firefox-legacy package and I made Firefox use this package with home manager. But It doesn’t work
overlays/firefox.nix:
inputs:
final: prev: {
firefox-legacy = prev.firefox.overrideAttrs (old: {
postInstall =
(old.postInstall or "")
+ ''
cp ${inputs.legacyfox}/config.js \
$out/lib/firefox/
cp ${inputs.legacyfox}/legacy.manifest \
$out/lib/firefox/
rm -f $out/lib/firefox/defaults/pref/channel-prefs.js
rm -f $out/lib/firefox/defaults/pref/autoconfig.js
cp ${inputs.legacyfox}/defaults/pref/config-prefs.js \
$out/lib/firefox/defaults/pref/autoconfig.js
cp -r ${inputs.legacyfox}/legacy \
$out/lib/firefox/
'';
});
}
flake.nix:
{
description = "My NixOS system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
legacyfox = {
url = "git+https://git.gir.st/LegacyFox.git";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, legacyfox, ... }@inputs:
let
system = "x86_64-linux";
in
{
nixosConfigurations.sigismund = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {inherit inputs;};
modules = [
{
nixpkgs.overlays = [
(import ./overlays/firefox-legacy.nix inputs)
];
}
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.max = import ./home.nix;
}
];
};
};
}
However, this doesn’t appear to work. When I inspect firefox’s runtime environment by running whereis firefox I don’t see the files I copied in using the overlay.
Could someone help me out and maybe point out where I am going wrong because I’d really like to get this patch working and start enjoying this operating system.