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).
This commit is contained in:
Simon Bruder 2021-03-03 21:44:40 +01:00
parent a962fea3a8
commit c0a130fa59
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -3,10 +3,17 @@
{ {
xdg.mimeApps = { xdg.mimeApps = {
enable = nixosConfig.sbruder.gui.enable; enable = nixosConfig.sbruder.gui.enable;
defaultApplications = { defaultApplications =
let
browser = "firefox.desktop";
in
{
"application/pdf" = "org.pwmt.zathura.desktop"; "application/pdf" = "org.pwmt.zathura.desktop";
"image/png" = "mpv.desktop";
"image/jpeg" = "mpv.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 # Some programs overwrite the mimeapps.list symlink with a normal file which