Skip to content

Commit

Permalink
Fixed jellyfin expose bug and improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Feb 26, 2024
1 parent f178465 commit b49cae6
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 605 deletions.
225 changes: 0 additions & 225 deletions gruvbox.theme

This file was deleted.

33 changes: 20 additions & 13 deletions nixarr/jellyfin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ in {
};

vpn.enable = mkEnableOption ''
Route Jellyfin traffic through the VPN. Requires that `nixarr.vpn`
is configured
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Jellyfin traffic through the VPN.
'';

expose = {
vpn = {
enable = mkEnableOption ''
**Required options:**
- `nixarr.jellyfin.vpn.enable`
- `nixarr.jellyfin.expose.vpn.port`
- [`nixarr.jellyfin.vpn.enable`](/options.html#nixarr.jellyfin.vpn.enable)
- [`nixarr.jellyfin.expose.vpn.port`](/options.html#nixarr.jellyfin.expose.vpn.port)
- [`nixarr.jellyfin.expose.vpn.accessibleFrom`](/options.html#nixarr.jellyfin.expose.vpn.accessibleFrom)
Expose the Jellyfin web service to the internet, allowing anyone to
access it.
Expand All @@ -42,12 +44,17 @@ in {
type = with types; nullOr port;
default = null;
description = ''
**Required options:** `nixarr.jellyfin.expose.vpn.enable`
The port to access jellyfin on. Get this port from your VPN provider.
The port to access jellyfin on. Get this port from your VPN
provider.
'';
};

**Important:** Do _not_ enable this without setting up Jellyfin
authentication through localhost first!
accessibleFrom = mkOption {
type = with types; nullOr str;
default = null;
example = "jellyfin.airvpn.org";
description = ''
The IP or domain that Jellyfin should be able to be accessed from.
'';
};
};
Expand All @@ -56,10 +63,10 @@ in {
enable = mkEnableOption ''
**Required options:**
- `nixarr.jellyfin.expose.https.acmeMail`
- `nixarr.jellyfin.expose.https.domainName`
- [`nixarr.jellyfin.expose.https.acmeMail`](/options.html#nixarr.jellyfin.expose.https.acmeMail)
- [`nixarr.jellyfin.expose.https.domainName`](/options.html#nixarr.jellyfin.expose.https.domainName)
**Conflicting options:** `nixarr.jellyfin.vpn.enable`
**Conflicting options:** [`nixarr.jellyfin.vpn.enable`](/options.html#nixarr.jellyfin.vpn.enable)
Expose the Jellyfin web service to the internet with https support,
allowing anyone to access it.
Expand Down Expand Up @@ -148,7 +155,7 @@ in {
};
};

virtualHosts."${config.util-nixarr.vpn.address}:${builtins.toString cfg.expose.vpn.port}" = mkIf cfg.expose.vpn.enable {
virtualHosts."${cfg.expose.vpn.accessibleFrom}:${builtins.toString cfg.expose.vpn.port}" = mkIf cfg.expose.vpn.enable {
enableACME = true;
forceSSL = true;
locations."/" = {
Expand Down
5 changes: 3 additions & 2 deletions nixarr/lidarr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ in {
};

vpn.enable = mkEnableOption ''
Route Lidarr traffic through the VPN. Requires that `nixarr.vpn`
is configured
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Lidarr traffic through the VPN.
'';
};

Expand Down
2 changes: 2 additions & 0 deletions nixarr/openssh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ in {
type = types.bool;
default = false;
description = ''
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Run the openssh service through a vpn.
**Note:** This option does _not_ enable the sshd service you still
Expand Down
5 changes: 3 additions & 2 deletions nixarr/prowlarr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ in {
};

vpn.enable = mkEnableOption ''
Route Prowlarr traffic through the VPN. Requires that `nixarr.vpn`
is configured.
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Prowlarr traffic through the VPN.
'';
};

Expand Down
5 changes: 3 additions & 2 deletions nixarr/radarr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ in {
};

vpn.enable = mkEnableOption ''
Route Radarr traffic through the VPN. Requires that `nixarr.vpn`
is configured.
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Radarr traffic through the VPN.
'';
};

Expand Down
5 changes: 3 additions & 2 deletions nixarr/readarr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ in {
};

vpn.enable = mkEnableOption ''
Route Readarr traffic through the VPN. Requires that `nixarr.vpn`
is configured.
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Readarr traffic through the VPN.
'';
};

Expand Down
5 changes: 3 additions & 2 deletions nixarr/sonarr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ in {
};

vpn.enable = mkEnableOption ''
Route Readarr traffic through the VPN. Requires that `nixarr.vpn`
is configured.
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
Route Sonarr traffic through the VPN.
'';
};

Expand Down
8 changes: 3 additions & 5 deletions nixarr/transmission/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ in {
default = "${nixarr.stateDir}/nixarr/transmission";
description = ''
The state directory for Transmission.
**BUG**: Only works when the `nixarr.transmission.vpn.enable` option
is set.
'';
};

Expand All @@ -33,8 +30,9 @@ in {
};

vpn.enable = mkEnableOption ''
**Recommended!** Route Transmission traffic through the VPN. Requires that `nixarr.vpn`
is configured.
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
**Recommended:** Route Transmission traffic through the VPN.
'';

flood.enable = mkEnableOption "Use the flood web-UI";
Expand Down
Loading

0 comments on commit b49cae6

Please sign in to comment.