Skip to content

Commit

Permalink
nixos/jellyseerr: add configDir option
Browse files Browse the repository at this point in the history
  • Loading branch information
coonce committed Dec 26, 2024
1 parent b12eaf3 commit 4b21c0c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nixos/modules/services/misc/jellyseerr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,28 @@ 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 {
systemd.services.jellyseerr = {
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";
Expand Down

0 comments on commit 4b21c0c

Please sign in to comment.