From 3b987a4817f26ffd69831cd648529482eee14c9f Mon Sep 17 00:00:00 2001 From: Adrian Gunnar Lauterer Date: Wed, 1 May 2024 16:08:10 +0200 Subject: [PATCH] medaserver profile --- machines/galadriel/configuration.nix | 10 +--------- profiles/mediaserver.nix | 15 +++++++++++++++ services/jellyfin.nix | 18 ++++++++++++++++++ services/podgrab.nix | 9 +++++++++ 4 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 profiles/mediaserver.nix create mode 100644 services/jellyfin.nix create mode 100644 services/podgrab.nix diff --git a/machines/galadriel/configuration.nix b/machines/galadriel/configuration.nix index fb3209b..b27093d 100644 --- a/machines/galadriel/configuration.nix +++ b/machines/galadriel/configuration.nix @@ -16,6 +16,7 @@ ../../profiles/base.nix ../../profiles/sops.nix ../../profiles/ai.nix + ../../profiles/mediaserver.nix ../../services/smb.nix ../../services/torrent.nix @@ -62,9 +63,6 @@ tailscale nfs-utils cifs-utils - jellyfin - jellyfin-web - jellyfin-mpv-shim jftui sonixd unpackerr @@ -87,12 +85,6 @@ ##productivity #services.tandoor-recipes.enable = true; -##media - users.groups.media.members = ["jellyfin"]; #have media directory owned by media group - services.jellyfin.group = "media"; - services.jellyfin.enable = true; - - # services.komga.enable = true; #services.polaris.enable = true; diff --git a/profiles/mediaserver.nix b/profiles/mediaserver.nix new file mode 100644 index 0000000..b39879e --- /dev/null +++ b/profiles/mediaserver.nix @@ -0,0 +1,15 @@ +{ config, pkgs, lib, ... }: +{ + imports = + [ + ./base.nix + ../services/podgrab.nix + ../services/jellyfin.nix + ]; + + environment.systemPackages = with pkgs.unstable; [ + ]; + + + +} diff --git a/services/jellyfin.nix b/services/jellyfin.nix new file mode 100644 index 0000000..8c95c5f --- /dev/null +++ b/services/jellyfin.nix @@ -0,0 +1,18 @@ +{ config, pkgs, lib, ... }: +{ + environment.systemPackages = with pkgs; [ + nfs-utils + cifs-utils + jellyfin + jellyfin-web + jellyfin-mpv-shim + jftui + sonixd + unpackerr + ]; + users.groups.media.members = ["jellyfin"]; #have media directory owned by media group + services.jellyfin.group = "media"; + services.jellyfin.enable = true; + services.jellyfin.openFirewall = true; + +} diff --git a/services/podgrab.nix b/services/podgrab.nix new file mode 100644 index 0000000..c068186 --- /dev/null +++ b/services/podgrab.nix @@ -0,0 +1,9 @@ +{ config, pkgs, lib, ... }: +{ + environment.systemPackages = [ + pkgs.podgrab + ]; + services.podgrab.enable = true; + services.podgrab.port = 4242; + networking.firewall.allowedTCPPorts = [ config.services.podgrab.port ]; +}