From 5659cceab5fe1c81fdbe3ee9ee0ef0fd9df23abd Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 4 Aug 2025 23:39:06 +0200 Subject: [PATCH] feat(tilo): add jellyfin configuration --- hosts/tilo/configuration.nix | 1 + system/services/default.nix | 1 + system/services/jellyfin.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 system/services/jellyfin.nix diff --git a/hosts/tilo/configuration.nix b/hosts/tilo/configuration.nix index 8848644..a35b7fb 100644 --- a/hosts/tilo/configuration.nix +++ b/hosts/tilo/configuration.nix @@ -40,6 +40,7 @@ services = { calibre.enable = true; endlessh.enable = true; + jellyfin.enable = true; plex = { enable = true; dataDir = "/tank/web/stacks/plex/plex-config"; diff --git a/system/services/default.nix b/system/services/default.nix index 7db36a3..549e675 100644 --- a/system/services/default.nix +++ b/system/services/default.nix @@ -3,6 +3,7 @@ ./calibre.nix ./endlessh.nix ./fwupd.nix + ./jellyfin.nix ./plex.nix ./printing.nix ./ssh.nix diff --git a/system/services/jellyfin.nix b/system/services/jellyfin.nix new file mode 100644 index 0000000..b8ea91a --- /dev/null +++ b/system/services/jellyfin.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.system.services.jellyfin; +in { + options.system.services.jellyfin = { + enable = mkEnableOption "Enable Jellyfin"; + dataDir = mkOption { + type = types.string; + default = "/tank/jellyfin/data"; + example = "/tank/jellyfin/data"; + }; + user = mkOption { + type = types.string; + default = "phundrak"; + }; + group = mkOption { + type = types.string; + default = "users"; + }; + }; + config.services.jellyfin = mkIf cfg.enable { + inherit (cfg) enable group user dataDir; + }; +}