From 23af1ef5ea44be2aff3f25c0118bc701f5797d48 Mon Sep 17 00:00:00 2001 From: tdpeuter Date: Fri, 15 Sep 2023 09:55:49 +0200 Subject: [PATCH] Add MIME defaults --- nixos/modules/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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; + }; + }; }; }