summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/poweredge/configuration.nix4
-rw-r--r--nixos/default.nix1
-rw-r--r--nixos/services/immich.nix5
-rw-r--r--nixos/services/jellyfin.nix33
4 files changed, 40 insertions, 3 deletions
diff --git a/hosts/poweredge/configuration.nix b/hosts/poweredge/configuration.nix
index ef99add..f2e3e09 100644
--- a/hosts/poweredge/configuration.nix
+++ b/hosts/poweredge/configuration.nix
@@ -44,6 +44,10 @@
enable = true;
mediaLocationHostPath = "/media/ingens/immich";
};
+ _jellyfin = {
+ enable = true;
+ mediaLocationHostPath = "/media/ingens/media";
+ };
};
#services._klipper.enable = true;
diff --git a/nixos/default.nix b/nixos/default.nix
index 53c2411..0555b5d 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -8,6 +8,7 @@
./services/fileshares.nix
./services/gitea.nix
./services/immich.nix
+ ./services/jellyfin.nix
./services/mailer.nix
./services/searxng.nix
./services/router/dns-dhcp.nix
diff --git a/nixos/services/immich.nix b/nixos/services/immich.nix
index 2746787..408148b 100644
--- a/nixos/services/immich.nix
+++ b/nixos/services/immich.nix
@@ -1,9 +1,8 @@
-{ lib, pkgs, config, ... }:
-let
+{ lib, pkgs, config, ... }: let
cfg = config.services._immich;
in {
options.services._immich = {
- enable = lib.mkEnableOption "enables cgit service";
+ enable = lib.mkEnableOption "enables immich service";
mediaLocationHostPath = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "host path to the media location";
diff --git a/nixos/services/jellyfin.nix b/nixos/services/jellyfin.nix
new file mode 100644
index 0000000..cbb2326
--- /dev/null
+++ b/nixos/services/jellyfin.nix
@@ -0,0 +1,33 @@
+{ lib, pkgs, config, ... }: let
+ cfg = config.services._jellyfin;
+in {
+ options.services._jellyfin = {
+ enable = lib.mkEnableOption "enables jellyfin service";
+ mediaLocationHostPath = lib.mkOption {
+ type = lib.types.nullOr lib.types.str;
+ description = "host path to the media location";
+ default = null;
+ };
+ };
+
+ config = {
+ containers.jellyfin = {
+ autoStart = true;
+ privateNetwork = false;
+ bindMounts = {
+ "/media" = lib.mkIf (cfg.mediaLocationHostPath != null) {
+ hostPath = cfg.mediaLocationHostPath;
+ isReadOnly = true;
+ };
+ };
+
+ config = { lib, config, ... }: {
+ services.jellyfin = {
+ enable = true;
+ };
+
+ system.stateVersion = "25.11";
+ };
+ };
+ };
+}