Skip to content

Commit

Permalink
Added extraAllowedIps to transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Mar 15, 2024
1 parent dd2fa60 commit 9d7c6c5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions nixarr/transmission/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ in {
description = "Open firewall for `peer-port` and `rpc-port`.";
};

extraAllowedIps = mkOption {
type = with types; listOf str;
default = [];
example = [ "10.19.5.10" ];
description = ''
Extra IP addresses allowed to access the Transmission RPC. By default
`192.168.*` and `127.0.0.1` (localhost) are allowed, but if your
local network has a weird ip for some reason, you can add it here.
'';
};

vpn.enable = mkOption {
type = types.bool;
default = false;
Expand Down Expand Up @@ -320,9 +331,10 @@ in {
then "192.168.15.1"
else "127.0.0.1";
rpc-port = cfg.uiPort;
# TODO: fix this for ssh tunneling...
rpc-whitelist-enabled = true;
rpc-whitelist = "127.0.0.1,192.168.*";
rpc-whitelist = strings.concatStringsSep "," ([
"127.0.0.1,192.168.*" # Defaults
] ++ cfg.extraAllowedIps);
rpc-authentication-required = false;

blocklist-enabled = true;
Expand Down

0 comments on commit 9d7c6c5

Please sign in to comment.