Merge branch 'lighttpd' of git://github.com/bjornfor/nixos into upstream-master

Moves config file into the store rather than polluting etc, which has a
number of benefits

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-04-01 13:09:23 -04:00
commit cf3ef6a1fc

@ -7,6 +7,9 @@ with pkgs.lib;
let
cfg = config.services.lighttpd;
configFile = pkgs.writeText "lighttpd.conf" ''
${cfg.configText}
'';
in
@ -64,21 +67,11 @@ in
description = "Lighttpd Web Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f /etc/lighttpd.conf";
serviceConfig.ExecStart = "${pkgs.lighttpd}/sbin/lighttpd -D -f ${configFile}";
# SIGINT => graceful shutdown
serviceConfig.KillSignal = "SIGINT";
};
environment.etc =
[
{ source = pkgs.writeText "lighttpd.conf"
''
${cfg.configText}
'';
target = "lighttpd.conf";
}
];
users.extraUsers.lighttpd = {
group = "lighttpd";
description = "lighttpd web server privilege separation user";