refactor(nixarr): move nixarr module into ooksmedia host module

This commit is contained in:
ooks-io 2024-04-13 18:43:43 +12:00
parent d932c75062
commit dd0a5d0ec6
5 changed files with 24 additions and 38 deletions

View file

@ -4,9 +4,10 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles ../../profiles
./nixarr.nix
]; ];
activeProfiles = ["base" "mediaServer" "gaming"]; activeProfiles = ["base" "gaming"];
systemModules.user = { systemModules.user = {
ooks.enable = true; ooks.enable = true;

View file

@ -0,0 +1,22 @@
{ inputs, ... }:
{
imports = [ inputs.nixarr.nixosModules.default ];
nixarr = {
enable = true;
mediaDir = "/jellyfin";
stateDir = "/var/lib/nixarr";
mediaUsers = ["ooks"];
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

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

View file

@ -1,31 +0,0 @@
{ lib, config, inputs, ... }:
let
cfg = config.systemModules.services.nixarr;
inherit (lib) mkEnableOption mkIf;
in
{
options.systemModules.services.nixarr.enable = mkEnableOption "Enable nixarr module";
imports = [ inputs.nixarr.nixosModules.default ];
config = mkIf cfg.enable {
nixarr = {
enable = true;
mediaDir = "/jellyfin";
stateDir = "/var/lib/nixarr";
mediaUsers = ["ooks"];
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,6 @@ in
imports = [ imports = [
./base ./base
./gaming ./gaming
./mediaServer
]; ];
options = { options = {
@ -26,9 +25,6 @@ in
gaming = { gaming = {
enable = lib.mkEnableOption "Enable the gaming profile"; enable = lib.mkEnableOption "Enable the gaming profile";
}; };
mediaServer = {
enable = lib.mkEnableOption "Enable the mediaServer profile";
};
}; };
}; };