nixos-config/services/media.nix

18 lines
293 B
Nix
Raw Normal View History

2021-02-19 21:21:35 +01:00
{ config, lib, ... }:
let
2022-01-11 16:08:21 +01:00
inherit (lib)
mkIf
;
mediaServices = builtins.attrValues {
inherit (config.my.services)
jellyfin
transmission
;
};
2021-02-19 21:21:35 +01:00
needed = builtins.any (service: service.enable) mediaServices;
in
{
2022-01-11 16:08:21 +01:00
config.users.groups.media = mkIf needed { };
2021-02-19 21:21:35 +01:00
}