From 78e58b311ed07918c9e8736780ebad2abd249755 Mon Sep 17 00:00:00 2001 From: Facecloth7226 Date: Mon, 3 Jun 2024 10:52:13 -0400 Subject: [PATCH] firefox: add extraPolicies support on Darwin with high enough stateVersion On Darwin, extraPolicies currently fails silently to do anything. This commit enables it to actually add policies given a firefox package when stateVersion is higher than 19.09 (currently, pkgs.firefox does not build.) --- modules/programs/firefox.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index 1370d4c2..ce2863f2 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -201,13 +201,13 @@ let in if package == null then null - else if isDarwin then - package else if versionAtLeast config.home.stateVersion "19.09" then package.override (old: { - cfg = old.cfg or { } // fcfg; + cfg = old.cfg or { } // (if isDarwin then { } else fcfg); extraPolicies = (old.extraPolicies or { }) // cfg.policies; }) + else if isDarwin then + package else (pkgs.wrapFirefox.override { config = bcfg; }) package { };