From 4b21c0c436e5623ff096ff647c5e4dee50fd0197 Mon Sep 17 00:00:00 2001 From: Daniel Coonce <1077480+coonce@users.noreply.github.com> Date: Wed, 25 Dec 2024 18:49:03 -0600 Subject: [PATCH] nixos/jellyseerr: add configDir option --- nixos/modules/services/misc/jellyseerr.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/misc/jellyseerr.nix b/nixos/modules/services/misc/jellyseerr.nix index 09aaf4ed5b97d..c500cc8b3a62e 100644 --- a/nixos/modules/services/misc/jellyseerr.nix +++ b/nixos/modules/services/misc/jellyseerr.nix @@ -20,6 +20,12 @@ in default = 5055; description = ''The port which the Jellyseerr web UI should listen to.''; }; + + configDir = lib.mkOption { + type = lib.types.path; + default = "/var/lib/jellyseerr/config"; + description = "Config data directory"; + }; }; config = lib.mkIf cfg.enable { @@ -27,14 +33,15 @@ in description = "Jellyseerr, a requests manager for Jellyfin"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - environment.PORT = toString cfg.port; + environment = { + PORT = toString cfg.port; + CONFIG_DIRECTORY = cfg.configDir; + }; serviceConfig = { Type = "exec"; StateDirectory = "jellyseerr"; - WorkingDirectory = "${cfg.package}/share/dist"; DynamicUser = true; ExecStart = lib.getExe cfg.package; - BindPaths = [ "/var/lib/jellyseerr/:${cfg.package}/share/dist/config/" ]; Restart = "on-failure"; ProtectHome = true; ProtectSystem = "strict";