programs: firefox: un-block about:debugging

This commit is contained in:
2024-12-02 18:44:46 +00:00
parent a45193f592
commit bdfd0a8901

View File

@@ -61,6 +61,8 @@ let
inherit (cfg.browser) libName; inherit (cfg.browser) libName;
inherit nativeMessagingHosts; inherit nativeMessagingHosts;
nixExtensions = lib.concatMap (ext: lib.optional ext.enable ext.package) (builtins.attrValues cfg.addons);
extraPrefsFiles = cfg.browser.extraPrefsFiles ++ mobile-prefs ++ [ extraPrefsFiles = cfg.browser.extraPrefsFiles ++ mobile-prefs ++ [
(pkgs.writeText "mozilla.cfg" '' (pkgs.writeText "mozilla.cfg" ''
// load additional preferences from user directory; inspired by librewolf // load additional preferences from user directory; inspired by librewolf
@@ -71,7 +73,16 @@ let
'') '')
]; ];
nixExtensions = lib.concatMap (ext: lib.optional ext.enable ext.package) (builtins.attrValues cfg.addons); extraPolicies = {
# XXX(2024-12-02): using `nixExtensions` causes `about:debugging` to be blocked.
# i guess this is because the page can install extensions, or something.
# fuck that, enable it by brute force
ExtensionSettings = {
"*" = {
installation_mode = "allowed";
};
};
};
}).overrideAttrs (base: { }).overrideAttrs (base: {
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [ nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
pkgs.copyDesktopItems pkgs.copyDesktopItems