mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
nixos/mysql: run as mysql user and group
As we don't need to setup data directories from ExecStartPre= scripts anymore, which required root, but use systemd.tmpfiles.rules instead, everything can be run as just the mysql user.
This commit is contained in:
parent
25494cc193
commit
edd10c12f7
2 changed files with 13 additions and 0 deletions
|
@ -326,6 +326,8 @@ in
|
|||
'';
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = "mysql";
|
||||
Type = if hasNotify then "notify" else "simple";
|
||||
# /run/mysqld needs to be created in addition to pidDir, as they could point to different locations
|
||||
RuntimeDirectory = "mysqld";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue