mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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:
commit
cf3ef6a1fc
1 changed files with 4 additions and 11 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue