modules: system: move 'media'
This commit is contained in:
parent
3ff50b1c22
commit
50a5347802
3 changed files with 1 additions and 2 deletions
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
# FIXME
|
||||
./media.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
16
modules/system/media.nix
Normal file
16
modules/system/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