nixos/pretix: update hardening
- Transition from world-readable to group-readable UMask - Remove world permissions from state directory
This commit is contained in:
parent
e2ccc754ac
commit
9afcf733f3
1 changed files with 4 additions and 2 deletions
|
@ -468,7 +468,7 @@ in
|
||||||
StateDirectory = [
|
StateDirectory = [
|
||||||
"pretix"
|
"pretix"
|
||||||
];
|
];
|
||||||
StateDirectoryMode = "0755";
|
StateDirectoryMode = "0750";
|
||||||
CacheDirectory = "pretix";
|
CacheDirectory = "pretix";
|
||||||
LogsDirectory = "pretix";
|
LogsDirectory = "pretix";
|
||||||
WorkingDirectory = cfg.settings.pretix.datadir;
|
WorkingDirectory = cfg.settings.pretix.datadir;
|
||||||
|
@ -507,7 +507,7 @@ in
|
||||||
"~@privileged"
|
"~@privileged"
|
||||||
"@chown"
|
"@chown"
|
||||||
];
|
];
|
||||||
UMask = "0022";
|
UMask = "0027";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
@ -561,6 +561,8 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.ExecStart = "${getExe' pythonEnv "celery"} -A pretix.celery_app worker ${cfg.celery.extraArgs}";
|
serviceConfig.ExecStart = "${getExe' pythonEnv "celery"} -A pretix.celery_app worker ${cfg.celery.extraArgs}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nginx.serviceConfig.SupplementaryGroups = mkIf cfg.nginx.enable [ "pretix" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.sockets.pretix-web.socketConfig = {
|
systemd.sockets.pretix-web.socketConfig = {
|
||||||
|
|
Loading…
Reference in a new issue