This repository has been archived on 2026-05-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
zen-browser-flake/hm-module.nix
Luis Quiñones 805c8f56e8 feat: allow policies.json management via unwrapped package override (#49)
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.
2025-04-18 11:11:14 -05:00

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;
};
};
};
}