System: Reformat mime associations
This commit is contained in:
@ -166,10 +166,23 @@ with mylib.networking; {
|
||||
enable = true;
|
||||
|
||||
removedAssociations = {
|
||||
"application/pdf" = ["chromium-browser.desktop" "com.google.Chrome.desktop" "firefox.desktop"];
|
||||
"text/plain" = ["firefox.desktop" "code.desktop"];
|
||||
"text/html" = ["chromium-browser.desktop" "com.google.Chrome.desktop"];
|
||||
"application/xhtml+xml" = ["chromium-browser.desktop" "com.google.Chrome.desktop"];
|
||||
"application/pdf" = [
|
||||
"chromium-browser.desktop"
|
||||
"com.google.Chrome.desktop"
|
||||
"firefox.desktop"
|
||||
];
|
||||
"text/plain" = [
|
||||
"firefox.desktop"
|
||||
"code.desktop"
|
||||
];
|
||||
"text/html" = [
|
||||
"chromium-browser.desktop"
|
||||
"com.google.Chrome.desktop"
|
||||
];
|
||||
"application/xhtml+xml" = [
|
||||
"chromium-browser.desktop"
|
||||
"com.google.Chrome.desktop"
|
||||
];
|
||||
};
|
||||
|
||||
defaultApplications = let
|
||||
@ -181,13 +194,58 @@ with mylib.networking; {
|
||||
audioPlayer = "vlc.desktop"; # mov.desktop
|
||||
videoPlayer = "vlc.desktop";
|
||||
|
||||
textMimeTypes = ["text/css" "text/csv" "text/javascript" "application/json" "application/ld+json" "application/x-sh" "text/plain" "application/xml" "text/xml"];
|
||||
fileBrowserMimeTypes = ["inode/directory"];
|
||||
webBrowserMimeTypes = ["text/html" "application/xhtml+xml"];
|
||||
pdfMimeTypes = ["application/pdf"];
|
||||
imageMimeTypes = ["image/apng" "image/avif" "image/bmp" "image/gif" "image/jpeg" "image/png" "image/svg+xml" "image/tiff" "image/webp"];
|
||||
audioMimeTypes = ["audio/aac" "audio/mpeg" "audio/ogg" "audio/opus" "audio/wav" "audio/webm" "audio/3gpp" "audio/3gpp2"];
|
||||
videoMimeTypes = ["video/x-msvideo" "video/mp4" "video/mpeg" "video/ogg" "video/mp2t" "video/webm" "video/3gpp" "video/3gpp2"];
|
||||
textMimeTypes = [
|
||||
"text/css"
|
||||
"text/csv"
|
||||
"text/javascript"
|
||||
"application/json"
|
||||
"application/ld+json"
|
||||
"application/x-sh"
|
||||
"text/plain"
|
||||
"application/xml"
|
||||
"text/xml"
|
||||
];
|
||||
fileBrowserMimeTypes = [
|
||||
"inode/directory"
|
||||
];
|
||||
webBrowserMimeTypes = [
|
||||
"text/html"
|
||||
"application/xhtml+xml"
|
||||
];
|
||||
pdfMimeTypes = [
|
||||
"application/pdf"
|
||||
];
|
||||
imageMimeTypes = [
|
||||
"image/apng"
|
||||
"image/avif"
|
||||
"image/bmp"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/svg+xml"
|
||||
"image/tiff"
|
||||
"image/webp"
|
||||
];
|
||||
audioMimeTypes = [
|
||||
"audio/aac"
|
||||
"audio/mpeg"
|
||||
"audio/ogg"
|
||||
"audio/opus"
|
||||
"audio/wav"
|
||||
"audio/webm"
|
||||
"audio/3gpp"
|
||||
"audio/3gpp2"
|
||||
];
|
||||
videoMimeTypes = [
|
||||
"video/x-msvideo"
|
||||
"video/mp4"
|
||||
"video/mpeg"
|
||||
"video/ogg"
|
||||
"video/mp2t"
|
||||
"video/webm"
|
||||
"video/3gpp"
|
||||
"video/3gpp2"
|
||||
];
|
||||
|
||||
mkAssociation = app: type: {${type} = app;};
|
||||
mkAssociations = app: types: lib.mergeAttrsList (builtins.map (mkAssociation app) types);
|
||||
|
Reference in New Issue
Block a user