config/modules/home/apps/web/zen/default.nix

25 lines
552 B
Nix
Raw Normal View History

2025-04-07 13:07:15 -04:00
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.web.zen;
in {
options.apps.web.zen = with types; {
enable = mkBoolOpt false "Enable or disable zen";
setDefault = mkBoolOpt false "Set zen as default browser";
};
2025-05-28 16:55:13 -04:00
config = mkIf (cfg.enable && !pkgs.stdenv.isDarwin) {
2025-04-07 13:07:15 -04:00
xdg.mimeApps.defaultApplications = mkIf cfg.setDefault {
2025-07-22 20:21:21 -04:00
"text/html" = "zen-twilight.desktop";
"x-scheme-handler/http" = "zen-twilight.desktop";
"x-scheme-handler/https" = "zen-twilight.desktop";
2025-04-07 13:07:15 -04:00
};
};
}