nixos/mastodon: fix group membership for nginx

4255954d97 set the StateDirectory to 0750,
but nginx wasn't in the Mastodon group. This commit also deletes a line,
that probably was intended to serve this purpose, but makes no sense.
Why should the Mastodon user be added as an extraGroup to the nginx
user?
This commit is contained in:
Justin Humm 2021-02-17 02:07:01 +01:00 committed by erictapen
parent d2cf75b2ff
commit 40f60919ab

View file

@ -111,7 +111,6 @@ in {
group = lib.mkOption {
description = ''
Group under which mastodon runs.
If it is set to "mastodon", a group will be created.
'';
type = lib.types.str;
default = "mastodon";
@ -555,10 +554,9 @@ in {
};
})
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package mastodonEnv ])
(lib.mkIf cfg.configureNginx {${config.services.nginx.user}.extraGroups = [ cfg.user ];})
];
users.groups.mastodon = lib.mkIf (cfg.group == "mastodon") { };
users.groups.${cfg.group}.members = lib.optional cfg.configureNginx config.services.nginx.user;
};
meta.maintainers = with lib.maintainers; [ happy-river erictapen ];