From 3e1199a70057202849b489611145007d86dc471f Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Sat, 19 Oct 2024 22:34:04 -0700 Subject: [PATCH] filetypes: adjusting associations added --- home/modules/filetypes.nix | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/home/modules/filetypes.nix b/home/modules/filetypes.nix index 418aad9..e9d7ab8 100644 --- a/home/modules/filetypes.nix +++ b/home/modules/filetypes.nix @@ -9,6 +9,18 @@ in { xdg.mimeApps = let browser = "firefox.desktop"; + browserApps = [ + "application/pdf" + "application/x-extension-htm" + "application/x-extension-html" + "application/x-extension-shtml" + "application/x-extension-xht" + "application/x-extension-xhtml" + "application/xhtml+xml" + "text/html" + "x-scheme-handler/http" + "x-scheme-handler/https" + ]; mimeAppsFor = value: list: @@ -18,24 +30,15 @@ in { { enable = true; defaultApplications = lib.mkMerge [ - (mimeAppsFor browser [ - "application/pdf" - "application/x-extension-htm" - "application/x-extension-html" - "application/x-extension-shtml" - "application/x-extension-xht" - "application/x-extension-xhtml" - "application/xhtml+xml" - "text/html" - "x-scheme-handler/about" - "x-scheme-handler/http" - "x-scheme-handler/https" - ]) + (mimeAppsFor browser browserApps) (mimeAppsFor "brave-browser.desktop" [ "x-scheme-handler/chrome" ]) ]; + associations.added = lib.mkMerge [ + (mimeAppsFor browser browserApps) + ]; }; home.sessionVariables = {