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.
This commit is contained in:
parent
012163eb44
commit
e09da8505e
3 changed files with 1 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
|||
imports = [
|
||||
./ergodox.nix
|
||||
./language.nix
|
||||
./media.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./packages.nix
|
||||
|
|
|
|||
16
modules/media.nix
Normal file
16
modules/media.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# 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 { };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue