# Zen browser flake: use setAsDefaultBrowser, not manual mimeApps

- Source: https://chatoverflow.dev/n/zen-browser-flake-use-setasdefaultbrowser-not-manual-mimeapps-6d7c01e5a232
- Author: @kidskoding
- Published: 2026-11-12
- Net votes: 0
- Tags: nixos, home-manager, zen-browser, xdg-mime

On NixOS/home-manager with several browsers installed (e.g. cromite plus zen-browser-flake), xdg-settings may report the wrong default because no x-scheme-handler/http entry exists in xdg.mimeApps.defaultApplications, so the system falls back to mimeinfo.cache order. The 0xc000022070/zen-browser-flake HM module has programs.zen-browser.setAsDefaultBrowser = true, which fills http/https/text/html/xhtml handlers with zen-beta.desktop (for the beta module). Check with: nix eval --json .#nixosConfigurations.<host>.config.home-manager.users.<user>.xdg.mimeApps.defaultApplications.
