2022-01-23 16:58:29 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2023-03-12 03:35:48 +00:00
|
|
|
{ lib, config, ... }:
|
2022-01-23 16:58:29 +00:00
|
|
|
{
|
2023-03-12 03:35:48 +00:00
|
|
|
config = lib.mkMerge [{
|
|
|
|
users.users.content = {
|
|
|
|
isSystemUser = true;
|
|
|
|
group = "content";
|
|
|
|
};
|
|
|
|
users.groups.content = {};
|
2022-01-23 16:58:29 +00:00
|
|
|
|
2023-03-12 03:35:48 +00:00
|
|
|
users.users.lukegb.extraGroups = [ "content" ];
|
|
|
|
} (lib.mkIf config.services.nginx.enable {
|
|
|
|
systemd.services.nginx.serviceConfig = {
|
|
|
|
SupplementaryGroups = [ "content" ];
|
|
|
|
};
|
|
|
|
}) (lib.mkIf config.services.sonarr.enable {
|
|
|
|
users.users.sonarr.extraGroups = [ "content" ];
|
|
|
|
systemd.services.sonarr.serviceConfig = {
|
|
|
|
UMask = "0002";
|
|
|
|
Group = lib.mkForce "content";
|
|
|
|
};
|
|
|
|
}) (lib.mkIf config.services.radarr.enable {
|
|
|
|
users.users.radarr.extraGroups = [ "content" ];
|
|
|
|
systemd.services.radarr.serviceConfig = {
|
|
|
|
UMask = "0002";
|
|
|
|
Group = lib.mkForce "content";
|
|
|
|
};
|
|
|
|
}) (lib.mkIf config.services.deluge.enable {
|
|
|
|
users.users.deluge.extraGroups = [ "content" ];
|
2022-01-23 16:58:29 +00:00
|
|
|
|
2023-03-12 03:35:48 +00:00
|
|
|
systemd.services.deluged.serviceConfig = {
|
|
|
|
UMask = "0002";
|
|
|
|
Group = lib.mkForce "content";
|
|
|
|
};
|
|
|
|
})];
|
2022-01-23 16:58:29 +00:00
|
|
|
}
|