refactor(nixarr): move nixarr module into ooksmedia host module
This commit is contained in:
parent
d932c75062
commit
dd0a5d0ec6
5 changed files with 24 additions and 38 deletions
|
|
@ -4,9 +4,10 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../profiles
|
||||
./nixarr.nix
|
||||
];
|
||||
|
||||
activeProfiles = ["base" "mediaServer" "gaming"];
|
||||
activeProfiles = ["base" "gaming"];
|
||||
|
||||
systemModules.user = {
|
||||
ooks.enable = true;
|
||||
|
|
|
|||
22
system/hosts/ooksmedia/nixarr.nix
Normal file
22
system/hosts/ooksmedia/nixarr.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
|
|
@ -4,14 +4,12 @@
|
|||
imports = [
|
||||
./mediaServer
|
||||
./system76Scheduler
|
||||
./nixarr
|
||||
];
|
||||
|
||||
options.systemModules.services = {
|
||||
mediaServer = {
|
||||
enable = lib.mkEnableOption "Enable mediaserver service module";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -10,7 +10,6 @@ in
|
|||
imports = [
|
||||
./base
|
||||
./gaming
|
||||
./mediaServer
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
@ -26,9 +25,6 @@ in
|
|||
gaming = {
|
||||
enable = lib.mkEnableOption "Enable the gaming profile";
|
||||
};
|
||||
mediaServer = {
|
||||
enable = lib.mkEnableOption "Enable the mediaServer profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue