Cleanup whitespaces

This commit is contained in:
orbitz 2013-04-14 11:14:27 +02:00
parent ce8c145a98
commit 8e7bb847c6

View file

@ -1,14 +1,14 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.services.nginx;
configFile = pkgs.writeText "nginx.conf" ''
${cfg.config}
'';
in
{
options = {
services.nginx = {
@ -18,7 +18,7 @@ in
Enable the nginx Web Server.
";
};
config = mkOption {
default = "";
description = "
@ -33,14 +33,14 @@ in
";
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.nginx ];
# TODO: test user supplied config file pases syntax test
systemd.services.nginx = {
description = "Nginx Web Server";
after = [ "network.target" ];
@ -55,11 +55,11 @@ in
ExecStart = "${pkgs.nginx}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
};
};
users.extraUsers.nginx = {
group = "nginx";
};
users.extraGroups.nginx = {};
};
}