3
0
Fork 0
forked from mirrors/nixpkgs

nixos/nginx: fix group and stateDir permissions

furthermore, I don't think adding nginx to systemPackages is of any use.
This commit is contained in:
Mathijs Kwik 2014-06-03 16:00:27 +02:00
parent 76c2c0c499
commit a97bef3e8c

View file

@ -84,8 +84,6 @@ in
};
config = mkIf cfg.enable {
environment.systemPackages = [ nginx ];
# TODO: test user supplied config file pases syntax test
systemd.services.nginx = {
@ -96,6 +94,7 @@ in
preStart =
''
mkdir -p ${cfg.stateDir}/logs
chmod 700 ${cfg.stateDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
'';
serviceConfig = {
@ -105,7 +104,7 @@ in
users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
{ name = "nginx";
group = "nginx";
group = cfg.group;
uid = config.ids.uids.nginx;
});