Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated docs
Browse files Browse the repository at this point in the history
rasmus-kirk committed Feb 22, 2024
1 parent aa7feed commit 871abcf
Showing 13 changed files with 57 additions and 72 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ nixarr = {
# These two values are also the default, but you can set them to whatever
# else you want
mediaDir = "/data/media";
stateDir = "/data/media/.state/nixarr";
stateDir = "/data/media/.state";
vpn = {
enable = true;
@@ -59,7 +59,7 @@ nixarr = {
enable = true;
# These options set up a nginx HTTPS reverse proxy, so you can access
# Jellyfin on your domain with HTTPS
nginx = {
expose = {
enable = true;
domainName = "your.domain.com";
acmeMail = "[email protected]"; # Required for ACME-bot
@@ -68,12 +68,47 @@ nixarr = {
transmission = {
enable = true;
useVpn = true;
vpn.enable = true;
peerPort = 50000; # Set this to the port forwarded by your VPN
};
# It is possible for this module to run the *Arrs through a VPN, but it
# is generally not recommended
# is generally not recommended, as it can cause rate-limiting issues.
sonarr.enable = true;
radarr.enable = true;
prowlarr.enable = true;
readarr.enable = true;
lidarr.enable = true;
};
```

Another example where port forwarding is not an option. This could be for
example if you're living in a dorm:

```nix
nixarr = {
enable = true;
vpn = {
enable = true;
wgConf = "/data/.secret/wg.conf";
};
jellyfin = {
enable = true;
vpn = {
enable = true;
# Access the Jellyfin web-ui from the internet
openWebPort = true;
};
};
transmission = {
enable = true;
vpn.enable = true;
peerPort = 50000; # Set this to the port forwarded by your VPN
};
sonarr.enable = true;
radarr.enable = true;
prowlarr.enable = true;
54 changes: 1 addition & 53 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions mkPandoc.nix
Original file line number Diff line number Diff line change
@@ -19,10 +19,12 @@ pkgs.writeShellApplication {
next;
}
{ print } # Print all lines, including those inside code blocks
' block=0 result/nixos.md > "$tmpdir"/pre.md
' block=0 result/nixos.md > "$tmpdir"/1.md
# inline code "blocks" to nix code blocks
# shellcheck disable=SC2016
sed '/^`[^`]*`$/s/`\(.*\)`/```nix\n\1\n```/g' "$tmpdir"/pre.md > "$tmpdir"/done.md
sed '/^`[^`]*`$/s/`\(.*\)`/```nix\n\1\n```/g' "$tmpdir"/1.md > "$tmpdir"/2.md
# Remove bottom util-nixarr options
sed '/util-nixarr/,$d' "$tmpdir"/2.md > "$tmpdir"/done.md
mkdir -p out
cp docs/styling/style.css out
2 changes: 1 addition & 1 deletion nixarr/default.nix
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ in {
"d '${cfg.mediaDir}/torrents/readarr' 0755 transmission media - -"
];

util.vpnnamespace = {
util-nixarr.vpnnamespace = {
enable = true;
accessibleFrom = [
"192.168.1.0/24"
4 changes: 2 additions & 2 deletions nixarr/jellyfin/default.nix
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ in {
allowedTCPPorts = [ 80 443 ];
};

util.upnp = mkIf cfg.expose.upnp.enable {
util-nixarr.upnp = mkIf cfg.expose.upnp.enable {
enable = true;
openTcpPorts = [ 80 443 ];
};
@@ -106,7 +106,7 @@ in {
defaults.email = cfg.expose.acmeMail;
};

util.vpnnamespace.portMappings = [
util-nixarr.vpnnamespace.portMappings = [
(
mkIf cfg.vpn.enable {
From = defaultPort;
2 changes: 1 addition & 1 deletion nixarr/lidarr/default.nix
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ in {
dataDir = cfg.stateDir;
};

util.vpnnamespace.portMappings = [
util-nixarr.vpnnamespace.portMappings = [
(
mkIf cfg.vpn.enable {
From = defaultPort;
2 changes: 1 addition & 1 deletion nixarr/prowlarr/default.nix
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ in {
};

config = mkIf cfg.enable {
util.services.prowlarr = mkIf (!cfg.vpn.enable) {
util-nixarr.services.prowlarr = mkIf (!cfg.vpn.enable) {
enable = true;
dataDir = cfg.stateDir;
};
2 changes: 1 addition & 1 deletion nixarr/radarr/default.nix
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ in {
dataDir = cfg.stateDir;
};

util.vpnnamespace.portMappings = [
util-nixarr.vpnnamespace.portMappings = [
(
mkIf cfg.vpn.enable {
From = defaultPort;
2 changes: 1 addition & 1 deletion nixarr/readarr/default.nix
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ in {
dataDir = cfg.stateDir;
};

util.vpnnamespace.portMappings = [
util-nixarr.vpnnamespace.portMappings = [
(
mkIf cfg.vpn.enable {
From = defaultPort;
2 changes: 1 addition & 1 deletion nixarr/sonarr/default.nix
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ in {
dataDir = cfg.stateDir;
};

util.vpnnamespace.portMappings = [
util-nixarr.vpnnamespace.portMappings = [
(mkIf cfg.vpn.enable {
From = defaultPort;
To = defaultPort;
2 changes: 1 addition & 1 deletion nixarr/transmission/default.nix
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ in {
// cfg.extraConfig;
};

util.vpnnamespace = mkIf cfg.vpn.enable {
util-nixarr.vpnnamespace = mkIf cfg.vpn.enable {
portMappings = [
{
From = cfg.uiPort;
4 changes: 2 additions & 2 deletions util/upnp/default.nix
Original file line number Diff line number Diff line change
@@ -6,9 +6,9 @@
...
}:
with lib; let
cfg = config.util.upnp;
cfg = config.util-nixarr.upnp;
in {
options.util.upnp = {
options.util-nixarr.upnp = {
enable = mkEnableOption "Enable port forwarding using UPNP.";

openTcpPorts = mkOption {
4 changes: 2 additions & 2 deletions util/vpnNamespace/default.nix
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@
# the namespace should use a vpn or not.
with builtins;
with lib; let
cfg = config.util.vpnnamespace;
cfg = config.util-nixarr.vpnnamespace;
in {
options.util.vpnnamespace = {
options.util-nixarr.vpnnamespace = {
enable =
mkEnableOption (lib.mdDoc "VPN Namespace")
// {

0 comments on commit 871abcf

Please sign in to comment.