nix-config/modules/media.nix

17 lines
324 B
Nix
Raw Normal View History

# Abstracting away the need for a common 'media' group
{ config, lib, ... }:
let
mediaServices = with config.my.services; [
2021-02-18 15:02:43 +01:00
calibre-web
jellyfin
pirate
sabnzbd
transmission
];
needed = builtins.any (service: service.enable) mediaServices;
in
{
config.users.groups.media = lib.mkIf needed { };
}