nix-config/modules/media.nix
Bruno BELANYI e09da8505e services: move 'media' to 'modules' instead
Its not actually a service, but more of a configuration needed by some
services. Therefore it belongs in modules.
2021-03-07 18:39:42 +00:00

17 lines
324 B
Nix

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