ops/nixos/lib/content: fixup

This commit is contained in:
Luke Granger-Brown 2023-03-12 03:35:48 +00:00
parent ca7b57a78a
commit c5d4542bbb

View file

@ -2,8 +2,9 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
{ lib, ... }: { lib, config, ... }:
{ {
config = lib.mkMerge [{
users.users.content = { users.users.content = {
isSystemUser = true; isSystemUser = true;
group = "content"; group = "content";
@ -11,23 +12,28 @@
users.groups.content = {}; users.groups.content = {};
users.users.lukegb.extraGroups = [ "content" ]; users.users.lukegb.extraGroups = [ "content" ];
users.users.sonarr.extraGroups = [ "content" ]; } (lib.mkIf config.services.nginx.enable {
users.users.radarr.extraGroups = [ "content" ];
users.users.deluge.extraGroups = [ "content" ];
systemd.services.nginx.serviceConfig = { systemd.services.nginx.serviceConfig = {
SupplementaryGroups = [ "content" ]; SupplementaryGroups = [ "content" ];
}; };
systemd.services.deluged.serviceConfig = { }) (lib.mkIf config.services.sonarr.enable {
UMask = "0002"; users.users.sonarr.extraGroups = [ "content" ];
Group = lib.mkForce "content";
};
systemd.services.sonarr.serviceConfig = { systemd.services.sonarr.serviceConfig = {
UMask = "0002"; UMask = "0002";
Group = lib.mkForce "content"; Group = lib.mkForce "content";
}; };
}) (lib.mkIf config.services.radarr.enable {
users.users.radarr.extraGroups = [ "content" ];
systemd.services.radarr.serviceConfig = { systemd.services.radarr.serviceConfig = {
UMask = "0002"; UMask = "0002";
Group = lib.mkForce "content"; Group = lib.mkForce "content";
}; };
}) (lib.mkIf config.services.deluge.enable {
users.users.deluge.extraGroups = [ "content" ];
systemd.services.deluged.serviceConfig = {
UMask = "0002";
Group = lib.mkForce "content";
};
})];
} }