2022-06-30 12:39:26 -04:00
|
|
|
{
|
|
|
|
description = "Overlay for a policy-configurable non-ESR Firefox";
|
|
|
|
|
2024-02-11 10:23:17 -05:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2022-06-30 12:39:26 -04:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs }: let
|
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
|
|
in rec {
|
|
|
|
packages.x86_64-linux = rec {
|
|
|
|
default = firefox-patched-unwrapped;
|
|
|
|
|
2024-11-18 18:03:05 -05:00
|
|
|
firefox-patched-unwrapped = (pkgs.firefox-unwrapped.override (prev: { buildMozillaMach = args: ((prev.buildMozillaMach args).override ({
|
2022-06-30 12:39:26 -04:00
|
|
|
geolocationSupport = false;
|
|
|
|
googleAPISupport = false;
|
2023-11-25 23:37:56 -05:00
|
|
|
drmSupport = false;
|
2022-08-24 15:10:44 -04:00
|
|
|
|
2023-11-25 23:37:56 -05:00
|
|
|
requireSigning = false;
|
|
|
|
allowAddonSideload = true;
|
2024-11-18 18:03:05 -05:00
|
|
|
})).overrideAttrs (oldAttrs: rec {
|
2022-06-30 12:39:26 -04:00
|
|
|
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
|
2024-01-03 03:00:37 -05:00
|
|
|
|
|
|
|
# Firefox disables about:debugging when manual addon
|
|
|
|
# installation is disabled by policy, since it can be used
|
|
|
|
# to sideload. I want managed addons *and* debugging.
|
|
|
|
./allow-debugging.patch
|
2022-06-30 12:39:26 -04:00
|
|
|
];
|
|
|
|
});
|
2024-11-18 18:03:05 -05:00
|
|
|
}));
|
2022-06-30 12:39:26 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
overlay = final: prev: {
|
|
|
|
inherit (packages.x86_64-linux) firefox-patched-unwrapped;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|