2024-08-25 23:02:35 +08:00
|
|
|
{ lib, ... }:
|
|
|
|
{
|
2024-07-24 00:14:27 +08:00
|
|
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
|
|
|
xdg.mimeApps = {
|
|
|
|
enable = true;
|
|
|
|
defaultApplications =
|
|
|
|
### Browser
|
2025-01-18 16:20:44 +08:00
|
|
|
lib.genAttrs [
|
2024-07-24 00:14:27 +08:00
|
|
|
"text/html"
|
|
|
|
"x-scheme-handler/http"
|
|
|
|
"x-scheme-handler/https"
|
|
|
|
"x-scheme-handler/about"
|
|
|
|
"x-scheme-handler/unknown"
|
2024-08-25 23:02:35 +08:00
|
|
|
] (_n: [ "firefox.desktop" ])
|
2024-07-24 00:14:27 +08:00
|
|
|
### Audio player
|
2024-12-14 12:48:43 +08:00
|
|
|
// lib.genAttrs [ "audio/aac" "audio/flac" "audio/mpeg" "audio/ogg" "audio/wav" ] (_n: [
|
|
|
|
"mpv.desktop"
|
|
|
|
])
|
2024-07-24 00:14:27 +08:00
|
|
|
### Image viewer
|
2024-12-14 12:48:43 +08:00
|
|
|
// lib.genAttrs [ "image/gif" "image/jpeg" "image/png" "image/webp" ] (_n: [
|
|
|
|
"org.gnome.Loupe.desktop"
|
|
|
|
])
|
2024-07-24 00:14:27 +08:00
|
|
|
### Video player
|
2024-12-14 12:48:43 +08:00
|
|
|
// lib.genAttrs [ "video/mp4" "video/mpeg" "video/webm" ] (_n: [ "mpv.desktop" ])
|
2024-07-24 00:14:27 +08:00
|
|
|
### Code editor
|
2024-12-14 12:48:43 +08:00
|
|
|
// lib.genAttrs [ "text/css" "text/html" "text/javascript" "text/plain" ] (_n: [ "nvim.desktop" ])
|
2024-07-26 14:36:27 +08:00
|
|
|
### Mail client
|
2024-12-14 12:48:43 +08:00
|
|
|
// lib.genAttrs [ "x-scheme-handler/mailto" "x-scheme-handler/mid" ] (_n: [
|
|
|
|
"thunderbird.desktop"
|
|
|
|
]);
|
2024-07-24 00:14:27 +08:00
|
|
|
};
|
|
|
|
}
|