updated docs
This commit is contained in:
@@ -46,7 +46,7 @@ nixarr = {
|
|||||||
# These two values are also the default, but you can set them to whatever
|
# These two values are also the default, but you can set them to whatever
|
||||||
# else you want
|
# else you want
|
||||||
mediaDir = "/data/media";
|
mediaDir = "/data/media";
|
||||||
stateDir = "/data/media/.state/nixarr";
|
stateDir = "/data/media/.state";
|
||||||
|
|
||||||
vpn = {
|
vpn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -59,7 +59,7 @@ nixarr = {
|
|||||||
enable = true;
|
enable = true;
|
||||||
# These options set up a nginx HTTPS reverse proxy, so you can access
|
# These options set up a nginx HTTPS reverse proxy, so you can access
|
||||||
# Jellyfin on your domain with HTTPS
|
# Jellyfin on your domain with HTTPS
|
||||||
nginx = {
|
expose = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domainName = "your.domain.com";
|
domainName = "your.domain.com";
|
||||||
acmeMail = "your@email.com"; # Required for ACME-bot
|
acmeMail = "your@email.com"; # Required for ACME-bot
|
||||||
@@ -68,12 +68,47 @@ nixarr = {
|
|||||||
|
|
||||||
transmission = {
|
transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useVpn = true;
|
vpn.enable = true;
|
||||||
peerPort = 50000; # Set this to the port forwarded by your VPN
|
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
|
# 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;
|
sonarr.enable = true;
|
||||||
radarr.enable = true;
|
radarr.enable = true;
|
||||||
prowlarr.enable = true;
|
prowlarr.enable = true;
|
||||||
|
|||||||
Generated
+1
-53
@@ -74,57 +74,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1708451036,
|
|
||||||
"narHash": "sha256-tgZ38NummEdnXvxj4D0StHBzXgceAw8CptytHljH790=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "517601b37c6d495274454f63c5a483c8e3ca6be1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1708118438,
|
|
||||||
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-flood": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1701810456,
|
|
||||||
"narHash": "sha256-jOl3DMrDgJYZeE/w5p7zQe+Ift7R307mXG/tyhH8WHE=",
|
|
||||||
"owner": "3JlOy-PYCCKUi",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "aff5b3aa1a95876fd426ab024d68ab2d87b0ebbd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "3JlOy-PYCCKUi",
|
|
||||||
"ref": "flood-module",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708501555,
|
"lastModified": 1708501555,
|
||||||
"narHash": "sha256-zJaF0RkdIPbh8LTmnpW/E7tZYpqIE+MePzlWwUNob4c=",
|
"narHash": "sha256-zJaF0RkdIPbh8LTmnpW/E7tZYpqIE+MePzlWwUNob4c=",
|
||||||
@@ -145,9 +95,7 @@
|
|||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-root": "flake-root",
|
"flake-root": "flake-root",
|
||||||
"home-manager": "home-manager",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"nixpkgs-flood": "nixpkgs-flood",
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-2
@@ -19,10 +19,12 @@ pkgs.writeShellApplication {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
{ print } # Print all lines, including those inside code blocks
|
{ 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
|
# inline code "blocks" to nix code blocks
|
||||||
# shellcheck disable=SC2016
|
# 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
|
mkdir -p out
|
||||||
cp docs/styling/style.css out
|
cp docs/styling/style.css out
|
||||||
|
|||||||
+1
-1
@@ -189,7 +189,7 @@ in {
|
|||||||
"d '${cfg.mediaDir}/torrents/readarr' 0755 transmission media - -"
|
"d '${cfg.mediaDir}/torrents/readarr' 0755 transmission media - -"
|
||||||
];
|
];
|
||||||
|
|
||||||
util.vpnnamespace = {
|
util-nixarr.vpnnamespace = {
|
||||||
enable = true;
|
enable = true;
|
||||||
accessibleFrom = [
|
accessibleFrom = [
|
||||||
"192.168.1.0/24"
|
"192.168.1.0/24"
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ in {
|
|||||||
allowedTCPPorts = [ 80 443 ];
|
allowedTCPPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
util.upnp = mkIf cfg.expose.upnp.enable {
|
util-nixarr.upnp = mkIf cfg.expose.upnp.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
openTcpPorts = [ 80 443 ];
|
openTcpPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
@@ -106,7 +106,7 @@ in {
|
|||||||
defaults.email = cfg.expose.acmeMail;
|
defaults.email = cfg.expose.acmeMail;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(
|
(
|
||||||
mkIf cfg.vpn.enable {
|
mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ in {
|
|||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(
|
(
|
||||||
mkIf cfg.vpn.enable {
|
mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
util.services.prowlarr = mkIf (!cfg.vpn.enable) {
|
util-nixarr.services.prowlarr = mkIf (!cfg.vpn.enable) {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(
|
(
|
||||||
mkIf cfg.vpn.enable {
|
mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
@@ -65,7 +65,7 @@ in {
|
|||||||
services.resolved.enable = true;
|
services.resolved.enable = true;
|
||||||
networking.nameservers = dnsServers;
|
networking.nameservers = dnsServers;
|
||||||
|
|
||||||
util.services.prowlarr = {
|
util-nixarr.services.prowlarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.util.services.prowlarr;
|
cfg = config.util-nixarr.services.prowlarr;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
util.services.prowlarr = {
|
util-nixarr.services.prowlarr = {
|
||||||
enable = mkEnableOption "Prowlarr";
|
enable = mkEnableOption "Prowlarr";
|
||||||
|
|
||||||
package = mkPackageOption pkgs "prowlarr" { };
|
package = mkPackageOption pkgs "prowlarr" { };
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ in {
|
|||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(
|
(
|
||||||
mkIf cfg.vpn.enable {
|
mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ in {
|
|||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(
|
(
|
||||||
mkIf cfg.vpn.enable {
|
mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ in {
|
|||||||
dataDir = cfg.stateDir;
|
dataDir = cfg.stateDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace.portMappings = [
|
util-nixarr.vpnnamespace.portMappings = [
|
||||||
(mkIf cfg.vpn.enable {
|
(mkIf cfg.vpn.enable {
|
||||||
From = defaultPort;
|
From = defaultPort;
|
||||||
To = defaultPort;
|
To = defaultPort;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ in {
|
|||||||
// cfg.extraConfig;
|
// cfg.extraConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.vpnnamespace = mkIf cfg.vpn.enable {
|
util-nixarr.vpnnamespace = mkIf cfg.vpn.enable {
|
||||||
portMappings = [
|
portMappings = [
|
||||||
{
|
{
|
||||||
From = cfg.uiPort;
|
From = cfg.uiPort;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.util.upnp;
|
cfg = config.util-nixarr.upnp;
|
||||||
in {
|
in {
|
||||||
options.util.upnp = {
|
options.util-nixarr.upnp = {
|
||||||
enable = mkEnableOption "Enable port forwarding using UPNP.";
|
enable = mkEnableOption "Enable port forwarding using UPNP.";
|
||||||
|
|
||||||
openTcpPorts = mkOption {
|
openTcpPorts = mkOption {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
# the namespace should use a vpn or not.
|
# the namespace should use a vpn or not.
|
||||||
with builtins;
|
with builtins;
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.util.vpnnamespace;
|
cfg = config.util-nixarr.vpnnamespace;
|
||||||
in {
|
in {
|
||||||
options.util.vpnnamespace = {
|
options.util-nixarr.vpnnamespace = {
|
||||||
enable =
|
enable =
|
||||||
mkEnableOption (lib.mdDoc "VPN Namespace")
|
mkEnableOption (lib.mdDoc "VPN Namespace")
|
||||||
// {
|
// {
|
||||||
|
|||||||
Reference in New Issue
Block a user