feat(profile:mediaServer): nixarr initial configuration

This commit is contained in:
ooks-io 2024-04-12 15:03:35 +12:00
parent e78f3f0378
commit b3a6c319f3
3 changed files with 31 additions and 1 deletions

View file

@ -4,12 +4,14 @@
imports = [
./mediaServer
./system76Scheduler
./nixarr
];
options.systemModules.services = {
mediaServer = {
enable = lib.mkEnableOption "Enable mediaserver service module";
};
};
}

View file

@ -0,0 +1,28 @@
{ lib, config, pkgs, ... }:
let
cfg = config.systemModules.services.nixarr;
inherit (lib) mkEnableOption mkIf;
in
{
options.systemModules.services.nixarr.enable = mkEnableOption "Enable nixarr module";
config = mkIf cfg.enable {
nixarr = {
enable = true;
mediaDir = "/jellyfin";
stateDir = "/var/lib/nixarr";
jellyfin.enable = true;
sonarr.enable = true;
radarr.enable = true;
prowlarr.enable = true;
transmission.enable = true;
};
fileSystems."/jellyfin" = {
device = "/dev/disk/by-label/jellyfin";
fsType = "btrfs";
};
};
}

View file

@ -10,7 +10,7 @@ in
config = lib.mkIf cfg.enable {
systemModules = {
services = {
mediaServer.enable = true;
nixarr.enable = true;
};
};
};