22 lines
312 B
Nix
22 lines
312 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit
|
|
(lib)
|
|
mkIf
|
|
;
|
|
|
|
mediaServices = builtins.attrValues {
|
|
inherit
|
|
(config.my.services)
|
|
jellyfin
|
|
transmission
|
|
;
|
|
};
|
|
needed = builtins.any (service: service.enable) mediaServices;
|
|
in {
|
|
config.users.groups.media = mkIf needed {};
|
|
}
|