From c0a130fa59676d79cd8b193a7d581589675d36c0 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 3 Mar 2021 21:44:40 +0100 Subject: [PATCH] xdg: Set firefox as default browser Strangely, it has been working until recently without explicit configuration (probably starting chromium changed it by setting something stateful). --- users/simon/modules/xdg.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/users/simon/modules/xdg.nix b/users/simon/modules/xdg.nix index a65c63d..8e5a050 100644 --- a/users/simon/modules/xdg.nix +++ b/users/simon/modules/xdg.nix @@ -3,11 +3,18 @@ { xdg.mimeApps = { enable = nixosConfig.sbruder.gui.enable; - defaultApplications = { - "application/pdf" = "org.pwmt.zathura.desktop"; - "image/png" = "mpv.desktop"; - "image/jpeg" = "mpv.desktop"; - }; + defaultApplications = + let + browser = "firefox.desktop"; + in + { + "application/pdf" = "org.pwmt.zathura.desktop"; + "image/jpeg" = "mpv.desktop"; + "image/png" = "mpv.desktop"; + "text/html" = browser; + "x-scheme-handler/http" = browser; + "x-scheme-handler/https" = browser; + }; }; # Some programs overwrite the mimeapps.list symlink with a normal file which # makes home-manager activation fail