]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/webapps/apache-theme/default.nix
Move Apache theme to pkgs
[perso/Immae/Config/Nix.git] / pkgs / webapps / apache-theme / default.nix
1 { theme_root ? null }:
2 rec {
3 theme = ./theme;
4 apacheConfig = ''
5 <Macro Apaxy %{folder} %{ignored}>
6 Alias /theme ${if isNull theme_root then theme else theme_root}
7 <Directory ${if isNull theme_root then theme else theme_root}>
8 Options -Indexes
9 AllowOverride None
10 Require all granted
11 </Directory>
12
13 # mod_autoindex
14 <Directory %{folder}>
15 Options Indexes
16 AllowOverride None
17 Require all granted
18
19 # Inspired from Apaxy by @adamwhitcroft
20
21 IndexOptions +Charset=UTF-8 +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=* +IconsAreLinks +ShowForbidden
22
23 IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"
24
25 IndexIgnoreReset ON
26 IndexIgnore /theme .htaccess %{ignored}
27
28 AddIcon /theme/icons/blank.png ^^BLANKICON^^
29 AddIcon /theme/icons/folder.png ^^DIRECTORY^^
30 AddIcon /theme/icons/folder-home.png ..
31
32 AddIconByType (TXT,/theme/icons/text.png) text/*
33 AddIconByType (IMG,/theme/icons/image.png) image/*
34 AddIconByType (SND,/theme/icons/audio.png) audio/*
35 AddIconByType (VID,/theme/icons/video.png) video/*
36
37 AddIcon /theme/icons/archive.png .7z .bz2 .cab .gz .tar
38 AddIcon /theme/icons/audio.png .aac .aif .aifc .aiff .ape .au .flac .iff .m4a .mid .mp3 .mpa .ra .wav .wma .f4a .f4b .oga .ogg .xm .it .s3m .mod
39 AddIcon /theme/icons/bin.png .bin .hex
40 AddIcon /theme/icons/bmp.png .bmp
41 AddIcon /theme/icons/c.png .c
42 AddIcon /theme/icons/calc.png .xlsx .xlsm .xltx .xltm .xlam .xlr .xls .csv
43 AddIcon /theme/icons/cd.png .iso
44 AddIcon /theme/icons/cpp.png .cpp
45 AddIcon /theme/icons/css.png .css .sass .scss
46 AddIcon /theme/icons/deb.png .deb
47 AddIcon /theme/icons/doc.png .doc .docx .docm .dot .dotx .dotm .log .msg .odt .pages .rtf .tex .wpd .wps
48 AddIcon /theme/icons/draw.png .svg .svgz
49 AddIcon /theme/icons/eps.png .ai .eps
50 AddIcon /theme/icons/exe.png .exe
51 AddIcon /theme/icons/gif.png .gif
52 AddIcon /theme/icons/h.png .h
53 AddIcon /theme/icons/html.png .html .xhtml .shtml .htm .URL .url
54 AddIcon /theme/icons/ico.png .ico
55 AddIcon /theme/icons/java.png .jar
56 AddIcon /theme/icons/jpg.png .jpg .jpeg .jpe
57 AddIcon /theme/icons/js.png .js .json
58 AddIcon /theme/icons/markdown.png .md
59 AddIcon /theme/icons/package.png .pkg .dmg
60 AddIcon /theme/icons/pdf.png .pdf
61 AddIcon /theme/icons/php.png .php .phtml
62 AddIcon /theme/icons/playlist.png .m3u .m3u8 .pls .pls8
63 AddIcon /theme/icons/png.png .png
64 AddIcon /theme/icons/ps.png .ps
65 AddIcon /theme/icons/psd.png .psd
66 AddIcon /theme/icons/py.png .py
67 AddIcon /theme/icons/rar.png .rar
68 AddIcon /theme/icons/rb.png .rb
69 AddIcon /theme/icons/rpm.png .rpm
70 AddIcon /theme/icons/rss.png .rss
71 AddIcon /theme/icons/script.png .bat .cmd .sh
72 AddIcon /theme/icons/sql.png .sql
73 AddIcon /theme/icons/tiff.png .tiff .tif
74 AddIcon /theme/icons/text.png .txt .nfo
75 AddIcon /theme/icons/video.png .asf .asx .avi .flv .mkv .mov .mp4 .mpg .rm .srt .swf .vob .wmv .m4v .f4v .f4p .ogv
76 AddIcon /theme/icons/xml.png .xml
77 AddIcon /theme/icons/zip.png .zip
78 DefaultIcon /theme/icons/default.png
79
80 HeaderName /theme/header.html
81 ReadmeName /theme/footer.html
82 IndexStyleSheet /theme/style.css
83 </Directory>
84 </Macro>
85 '';
86 }