firefox overlay
This commit is contained in:
commit
2e6674a9d4
4 changed files with 87 additions and 0 deletions
38
flake.nix
Normal file
38
flake.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Overlay for a policy-configurable non-ESR Firefox";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in rec {
|
||||
packages.x86_64-linux = rec {
|
||||
default = firefox-patched-unwrapped;
|
||||
|
||||
firefox-patched-unwrapped = (pkgs.firefox-unwrapped.override {
|
||||
geolocationSupport = false;
|
||||
googleAPISupport = false;
|
||||
}).overrideAttrs (oldAttrs: rec {
|
||||
# wrapFirefox gets scared if you try to give addons to non-ESR firefox
|
||||
name = oldAttrs.name + "-not-esr";
|
||||
patches = oldAttrs.patches ++ [
|
||||
# I want to preconfigure the search engine settings to make
|
||||
# DuckDuckGo the default search engine and remove most of the
|
||||
# others. For some reason, Mozilla is scared of allowing
|
||||
# managed policies to set the default search engine in non-ESR
|
||||
# firefox. This is a two-line patch to remove that
|
||||
# restriction.
|
||||
# https://github.com/mozilla/policy-templates/issues/484
|
||||
./allow-searchengines-policy.patch
|
||||
# Nix's wrapFirefox enables unsigned addons, but mainline
|
||||
# Firefox has that force-locked.
|
||||
./allow-unsigned-addons.patch
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
overlay = final: prev: {
|
||||
inherit (packages.x86_64-linux) firefox-patched-unwrapped;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue