|
5
|
1 |
{ pkgs, ... }:
|
|
|
2 |
|
|
|
3 |
let
|
|
|
4 |
|
|
|
5 |
entries = [
|
|
|
6 |
(mkItem "${pkgs.libreoffice}/bin/soffice" [
|
|
|
7 |
"application/vnd.sun.xml.writer"
|
|
|
8 |
"application/vnd.sun.xml.writer.global"
|
|
|
9 |
"application/vnd.stardivision.writer"
|
|
|
10 |
"application/vnd.stardivision.writer-global"
|
|
|
11 |
"application/x-starwriter"
|
|
|
12 |
"application/vnd.sun.xml.writer.template"
|
|
|
13 |
"application/vnd.sun.xml.calc"
|
|
|
14 |
"application/vnd.stardivision.calc"
|
|
|
15 |
"application/x-starcalc"
|
|
|
16 |
"application/vnd.sun.xml.calc.template"
|
|
|
17 |
"application/excel"
|
|
|
18 |
"application/msexcel"
|
|
|
19 |
"application/vnd.ms-excel"
|
|
|
20 |
"application/x-msexcel"
|
|
|
21 |
"application/vnd.sun.xml.impress"
|
|
|
22 |
"application/vnd.stardivision.impress"
|
|
|
23 |
"application/vnd.stardivision.impress-packed"
|
|
|
24 |
"application/x-starimpress"
|
|
|
25 |
"application/vnd.sun.xml.impress.template"
|
|
|
26 |
"application/powerpoint"
|
|
|
27 |
"application/mspowerpoint"
|
|
|
28 |
"application/vnd.ms-powerpoint"
|
|
|
29 |
"application/x-mspowerpoint"
|
|
|
30 |
"application/vnd.sun.xml.draw"
|
|
|
31 |
"application/vnd.stardivision.draw"
|
|
|
32 |
"application/x-stardraw"
|
|
|
33 |
"application/vnd.sun.xml.draw.template"
|
|
|
34 |
"application/vnd.sun.xml.math"
|
|
|
35 |
"application/vnd.stardivision.math"
|
|
|
36 |
"application/x-starmath"
|
|
|
37 |
])
|
|
|
38 |
(mkItem "less" [
|
|
|
39 |
"application/x-sh"
|
|
|
40 |
"text/*"
|
|
|
41 |
])
|
|
|
42 |
(mkItem "${pkgs.mupdf}/bin/mupdf-x11" [ "application/pdf" ])
|
|
|
43 |
(mkItem "${pkgs.feh}/bin/feh" [ "image/*" ])
|
|
|
44 |
(mkItem "${pkgs.antiword}/bin/antiword" [
|
|
|
45 |
"application/msword"
|
|
|
46 |
"application/octet-stream"
|
|
|
47 |
])
|
|
|
48 |
(mkItem "${pkgs.lynx}/bin/lynx -dump -force-html" [ "text/html" ])
|
|
|
49 |
|
|
|
50 |
];
|
|
|
51 |
|
|
|
52 |
mkItem = p: t: {
|
|
|
53 |
prg = p; types = t;
|
|
|
54 |
};
|
|
|
55 |
|
|
|
56 |
mkPrg = { prg, types }:
|
|
|
57 |
builtins.concatStringsSep "\n" (map (v: "${v};${prg} %s") types);
|
|
|
58 |
|
|
|
59 |
in {
|
|
|
60 |
home.file.".mailcap".text = ''
|
|
|
61 |
${builtins.concatStringsSep "\n" (map mkPrg entries)}
|
|
|
62 |
'';
|
|
|
63 |
}
|