Open shishkin opened 9 months ago
I have also come across the same issue and created a band-aid solution for it
final: prev: {
firefox-darwin = prev.firefox-bin.overrideAttrs (previousAttrs: {
postInstall = ''
folder="''${out}/Applications/Firefox.app/Contents/Resources/distribution"
mkdir -p "''${folder}"
touch "''${folder}/policies.json"
echo '{
"policies": {
"DisableAppUpdate": true,
"AppAutoUpdate": false,
"ExtensionUpdate": false,
"EncryptedMediaExtensions": {
"Enabled": false
}
}
}' > "''${folder}/policies.json"
'';
});
}
Could it be home-manager which is not applying the policies? https://github.com/nix-community/home-manager/blob/1bbc1a5a1f4de7401c92db85b2119ed21bb4139d/modules/programs/firefox.nix#L205-L206
It is also possible to set policies in macOS with the defaults
command, which home-manager supports directly, however this feels less "pure" in the sense that if you removed a policy entry, I don't think it would revert it to FF default...
Thanks for providing this overlay. I've used it to install Firefox via Home Manager
programs.firefox
and it mostly worked. One issue I had is that this package seem to ignore policies option. The nixpkgs version does place the policies.json file inside the package: https://github.com/NixOS/nixpkgs/blob/nixpkgs-23.11-darwin/pkgs/applications/networking/browsers/firefox-bin/default.nix#L107-L109. According to Mozilla the file should be written toFirefox.app/Contents/Resources/distribution
. Would it make sense to support policies in this overlay?