{ config, lib, pkgs, ... } : with lib; let cfg = config.local.apps.web; in { options.local.apps.web.enable = mkEnableOption "Browsers"; config = mkIf cfg.enable { home.packages = with pkgs; [ chromium firefox ]; xdg.mimeApps.defaultApplications = { "application/x-extension-htm" = [ "firefox.desktop" ]; "application/x-extension-html" = [ "firefox.desktop" ]; "application/x-extension-shtml" = [ "firefox.desktop" ]; "application/x-extension-xht" = [ "firefox.desktop" ]; "application/x-extension-xhtml" = [ "firefox.desktop" ]; "application/xhtml+xml" = [ "firefox.desktop" ]; "text/html" = [ "firefox.desktop" ]; "x-scheme-handler/http" = [ "firefox.desktop" ]; "x-scheme-handler/https" = [ "firefox.desktop" ]; }; }; }