diff --git a/modules/services/web-servers/lighttpd.nix b/modules/services/web-servers/lighttpd.nix index 35a9ca78a59..1931fa65e51 100644 --- a/modules/services/web-servers/lighttpd.nix +++ b/modules/services/web-servers/lighttpd.nix @@ -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";