From 7f8ae63483cf77ddb16a6644a3bda0f5a1f88c82 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 6 Oct 2024 22:20:21 +0200 Subject: [PATCH] home/programs/xdg: set default mime apps --- home/programs/xdg.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 home/programs/xdg.nix diff --git a/home/programs/xdg.nix b/home/programs/xdg.nix new file mode 100644 index 0000000..a0d29ba --- /dev/null +++ b/home/programs/xdg.nix @@ -0,0 +1,24 @@ +{config, ...}: { + xdg = { + enable = true; + cacheHome = config.home.homeDirectory + "/.local/cache"; + + mimeApps = { + enable = true; + defaultApplications = { + "default-web-browser" = ["firefox.desktop"]; + "text/html" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + "x-scheme-handler/about" = ["firefox.desktop"]; + "x-scheme-handler/unknown" = ["firefox.desktop"]; + "x-scheme-handler/chrome" = ["chromium-browser.desktop"]; + "inode/directory" = ["yazi.desktop"]; + "image/png" = ["org.gnome.Loupe.desktop"]; + "image/svg" = [" org.gnome.Loupe.desktop"]; + "image/jpeg" = ["org.gnome.Loupe.desktop"]; + "image/gif" = [" org.gnome.Loupe.desktop"]; + }; + }; + }; +}