Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a99c2556f437
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aff0725a7d51
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 29, 2017

  1. nixos/lighttpd: update list of allowed module names

    * mod_dirlisting is auto-loaded by lighttpd and should not be explicitly
      loaded in the configuration file.
    * The rest comes from looking at "ls -1 $lighttpd/lib/*.so" when
      lighttpd is built with "enableMagnet" and "enableMysql".
    bjornfor committed Jul 29, 2017
    Copy the full SHA
    b339e6e View commit details
  2. lighttpd: install configuration examples

    Place them in $out/share/lighttpd/doc/config/.
    
    Most importantly, this includes a complete set of mime types in the
    $out/share/lighttpd/doc/config/conf.d/mime.conf file. The plan is to use
    that file in the NixOS lighttpd module.
    bjornfor committed Jul 29, 2017
    Copy the full SHA
    a65d8d3 View commit details
  3. nixos/lighttpd: add enableUpstreamMimeTypes option

    enableUpstreamMimeTypes controls whether to include the list of mime
    types bundled with lighttpd (upstream). This option is enabled by
    default and gives a much more complete mime type list than we currently
    have. If you disable this, no mime types will be added by NixOS and you
    will have to add your own mime types in services.lighttpd.extraConfig.
    bjornfor committed Jul 29, 2017
    Copy the full SHA
    aff0725 View commit details
Showing with 27 additions and 9 deletions.
  1. +18 −9 nixos/modules/services/web-servers/lighttpd/default.nix
  2. +9 −0 pkgs/servers/http/lighttpd/default.nix
27 changes: 18 additions & 9 deletions nixos/modules/services/web-servers/lighttpd/default.nix
Original file line number Diff line number Diff line change
@@ -37,8 +37,10 @@ let
"mod_rrdtool"
"mod_accesslog"
# Remaining list of modules, order assumed to be unimportant.
"mod_authn_file"
"mod_authn_mysql"
"mod_cml"
"mod_dirlisting"
"mod_deflate"
"mod_evasive"
"mod_extforward"
"mod_flv_streaming"
@@ -47,6 +49,7 @@ let
"mod_scgi"
"mod_setenv"
"mod_trigger_b4_dl"
"mod_uploadprogress"
"mod_webdav"
];

@@ -86,14 +89,9 @@ let
accesslog.use-syslog = "enable"
server.errorlog-use-syslog = "enable"
mimetype.assign = (
".html" => "text/html",
".htm" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css"
)
${lib.optionalString cfg.enableUpstreamMimeTypes ''
include "${pkgs.lighttpd}/share/lighttpd/doc/config/conf.d/mime.conf"
''}
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )
@@ -165,6 +163,17 @@ in
'';
};

enableUpstreamMimeTypes = mkOption {
type = types.bool;
default = true;
description = ''
Whether to include the list of mime types bundled with lighttpd
(upstream). If you disable this, no mime types will be added by
NixOS and you will have to add your own mime types in
<option>services.lighttpd.extraConfig</option>.
'';
};

mod_status = mkOption {
default = false;
type = types.bool;
9 changes: 9 additions & 0 deletions pkgs/servers/http/lighttpd/default.nix
Original file line number Diff line number Diff line change
@@ -26,6 +26,15 @@ stdenv.mkDerivation rec {
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
'';

postInstall = ''
mkdir -p "$out/share/lighttpd/doc/config"
cp -vr doc/config "$out/share/lighttpd/doc/"
# Remove files that references needless store paths (dependency bloat)
rm "$out/share/lighttpd/doc/config/Makefile"*
rm "$out/share/lighttpd/doc/config/conf.d/Makefile"*
rm "$out/share/lighttpd/doc/config/vhosts.d/Makefile"*
'';

meta = with stdenv.lib; {
description = "Lightweight high-performance web server";
homepage = http://www.lighttpd.net/;