flakes/modules/nixos/services/arr/default.nix
Chinmay D. Pai 3a3a8afe30
feat: add nixos configuration based on snowfall-lib
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-02 18:31:19 +05:30

52 lines
1.2 KiB
Nix

{
config,
lib,
pkgs,
...
}: {
options.snowflake.services.arr = {
enable = lib.mkEnableOption "Enable arr suite configuration";
jellyfin.enable = lib.mkEnableOption "Enable jellyfin configuration for NixOS";
# mediaDir = lib.mkOption {
# type = lib.types.path;
# description = "Path to media storage directory, accessible by all *arr suite applications";
# };
};
config = let
cfg = config.snowflake.services.arr;
in
lib.mkIf cfg.enable {
services.jellyfin = {
enable = cfg.jellyfin.enable;
openFirewall = true;
};
users.groups.media = {
members = ["@wheel" "jellyfin"];
};
nixpkgs.config.packageOverrides = pkgs: {
jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override {
ffmpeg_6-full = pkgs.ffmpeg_6-full.override {
withMfx = false;
withVpl = true;
};
};
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
onevpl-intel-gpu
libvdpau-va-gl
];
};
services.jellyseerr.enable = true;
services.jellyseerr.openFirewall = true;
};
}