Bruno BELANYI
e09da8505e
Its not actually a service, but more of a configuration needed by some services. Therefore it belongs in modules.
17 lines
324 B
Nix
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 { };
|
|
}
|