remove stateDir option and add port option

This commit is contained in:
Rohan Datar
2025-01-04 17:03:00 -06:00
parent 033b356ede
commit 564f7d9671
+7 -18
View File
@@ -6,7 +6,6 @@
}: }:
with lib; let with lib; let
cfg = config.nixarr.jellyseerr; cfg = config.nixarr.jellyseerr;
defaultPort = 5055;
nixarr = config.nixarr; nixarr = config.nixarr;
in { in {
options.nixarr.jellyseerr = { options.nixarr.jellyseerr = {
@@ -23,23 +22,11 @@ in {
package = mkPackageOption pkgs "jellyseerr" {}; package = mkPackageOption pkgs "jellyseerr" {};
stateDir = mkOption { port = mkOption {
type = types.path; type = types.port;
default = "${nixarr.stateDir}/jellyseerr"; default = 5055;
defaultText = literalExpression ''"''${nixarr.stateDir}/jellyseerr"''; example = 12345;
example = "/nixarr/.state/jellyseerr"; description = "Jellyseerr web-UI port.";
description = ''
The location of the state directory for the Jellyseerr service.
> **Warning:** Setting this to any path, where the subpath is not
> owned by root, will fail! For example:
>
> ```nix
> stateDir = /home/user/nixarr/.state/Jellyseerr
> ```
>
> Is not supported, because `/home/user` is owned by `user`.
'';
}; };
openFirewall = mkOption { openFirewall = mkOption {
@@ -83,6 +70,8 @@ in {
services.jellyseerr = { services.jellyseerr = {
enable = cfg.enable; enable = cfg.enable;
package = cfg.package; package = cfg.package;
openFirewall = cfg.openFirewall;
port = cfg.port;
}; };
# Enable and specify VPN namespace to confine service in. # Enable and specify VPN namespace to confine service in.