Skip to content

Commit

Permalink
Add defaultMimeTypes to Nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebucatnetzer committed Nov 20, 2023
1 parent 525d60c commit f236d4a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/modules/services/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ let
scgi_temp_path ${config.env.DEVENV_STATE}/nginx/;
uwsgi_temp_path ${config.env.DEVENV_STATE}/nginx/;
include ${cfg.defaultMimeTypes};
${cfg.httpConfig}
}
'';
Expand All @@ -34,6 +36,18 @@ in
description = "The nginx package to use.";
};

defaultMimeTypes = lib.mkOption {
type = lib.types.path;
default = "${pkgs.mailcap}/etc/nginx/mime.types";
defaultText = lib.literalExpression "$''{pkgs.mailcap}/etc/nginx/mime.types";
example = lib.literalExpression "$''{pkgs.nginx}/conf/mime.types";
description = lib.mdDoc ''
Default MIME types for NGINX, as MIME types definitions from NGINX are very incomplete,
we use by default the ones bundled in the mailcap package, used by most of the other
Linux distributions.
'';
};

httpConfig = lib.mkOption {
type = lib.types.lines;
default = "";
Expand Down

0 comments on commit f236d4a

Please sign in to comment.