In previous iterations the browser were forced to have disabled updates but this might create an undesirable behavior in tools like 1Password as you can see here: https://github.com/0xc000022070/zen-browser-flake/issues/48 So I'm allowing to override the browser policies. This will only work for unwrapped packages.
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{
|
|
home-manager,
|
|
self,
|
|
name,
|
|
}: {
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
applicationName = "Zen Browser";
|
|
modulePath = [
|
|
"programs"
|
|
"zen-browser"
|
|
];
|
|
|
|
mkFirefoxModule = import "${home-manager.outPath}/modules/programs/firefox/mkFirefoxModule.nix";
|
|
in {
|
|
imports = [
|
|
(mkFirefoxModule {
|
|
inherit modulePath;
|
|
name = applicationName;
|
|
wrappedPackageName = "zen-${name}-unwrapped";
|
|
unwrappedPackageName = "zen-${name}";
|
|
visible = true;
|
|
platforms = {
|
|
linux = {
|
|
vendorPath = ".zen";
|
|
configPath = ".zen";
|
|
};
|
|
darwin = {
|
|
configPath = "Library/Application Support/Zen";
|
|
};
|
|
};
|
|
})
|
|
];
|
|
|
|
config = lib.mkIf config.programs.zen-browser.enable {
|
|
programs.zen-browser = {
|
|
package = self.packages.${pkgs.stdenv.system}.${name};
|
|
# This does not work, the package can't build using these policies
|
|
policies = lib.mkDefault {
|
|
DisableAppUpdate = true;
|
|
DisableTelemetry = true;
|
|
};
|
|
};
|
|
};
|
|
}
|