diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index 2d1dca6..aa2a856 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -57,6 +57,29 @@ }; }; + + xdg.mimeApps = + let + browser = "firefox.desktop"; + image-viewer = "nsxiv.desktop"; + in { + enable = true; + + defaultApplications = { + "x-scheme-handler/http" = browser; + "x-scheme-handler/https" = browser; + "x-scheme-handler/chrome" = browser; + "text/html" = browser; + "application/x-extension-htm" = browser; + "application/x-extension-html" = browser; + "application/x-extension-shtml" = browser; + "application/xhtml+xml" = browser; + "application/x-extension-xhtml" = browser; + "application/x-extension-xht" = browser; + "image/jpeg" = image-viewer; + "image/png" = image-viewer; + }; + }; }; }