Improved docs

This commit is contained in:
rasmus-kirk
2024-03-03 21:06:20 +01:00
parent f07c6b8544
commit bfb6223c9c
10 changed files with 38 additions and 13 deletions
+2
View File
@@ -12,6 +12,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:**
@@ -25,6 +26,7 @@ in {
keysFile = mkOption {
type = with types; nullOr path;
default = null;
example = "/data/.secret/njalla/keys-file.json";
description = ''
A path to a JSON-file containing key value pairs of domains and keys.
+7
View File
@@ -15,12 +15,14 @@ in with lib; {
type = types.path;
default = "${nixarr.stateDir}/jellyfin";
defaultText = literalExpression ''"''${nixarr.stateDir}/jellyfin"'';
example = "/home/user/.local/share/nixarr/jellyfin";
description = "The state directory for Jellyfin.";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
**Conflicting options:** [`nixarr.jellyfin.expose.https.enable`](#nixarr.jellyfin.expose.https.enable)
@@ -34,6 +36,7 @@ in with lib; {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:**
@@ -52,6 +55,7 @@ in with lib; {
port = mkOption {
type = with types; nullOr port;
default = null;
example = 12345;
description = ''
The port to access jellyfin on. Get this port from your VPN
provider.
@@ -72,6 +76,7 @@ in with lib; {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:**
@@ -93,12 +98,14 @@ in with lib; {
domainName = mkOption {
type = types.nullOr types.str;
default = null;
example = "jellyfin.example.com";
description = "The domain name to host Jellyfin on.";
};
acmeMail = mkOption {
type = types.nullOr types.str;
default = null;
example = "mail@example.com";
description = "The ACME mail required for the letsencrypt bot.";
};
};
+2
View File
@@ -14,12 +14,14 @@ in {
type = types.path;
default = "${nixarr.stateDir}/lidarr";
defaultText = literalExpression ''"''${nixarr.stateDir}/lidarr"'';
example = "/home/user/.local/share/nixarr/lidarr";
description = "The state directory for Lidarr";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+6 -1
View File
@@ -24,6 +24,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Whether or not to enable the nixarr module. Has the following features:
@@ -58,6 +59,7 @@ in {
mediaDir = mkOption {
type = types.path;
default = "/data/media";
example = "/home/user/nixarr";
description = ''
The location of the media directory for the services.
'';
@@ -66,6 +68,7 @@ in {
stateDir = mkOption {
type = types.path;
default = "/data/.state/nixarr";
example = "/home/user/.local/share/nixarr";
description = ''
The location of the state directory for the services.
'';
@@ -75,6 +78,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.wgConf`](#nixarr.vpn.wgconf)
@@ -86,6 +90,7 @@ in {
wgConf = mkOption {
type = types.nullOr types.path;
default = null;
example = "/data/.secret/vpn/wg.conf";
description = "The path to the wireguard configuration file.";
};
@@ -98,11 +103,11 @@ in {
port = mkOption {
type = with types; nullOr port;
default = null;
example = 58403;
description = ''
The port that netcat listens to on the vpn test service. If set to
`null`, then netcat will not be started.
'';
example = 58403;
};
};
+1
View File
@@ -10,6 +10,7 @@ in {
options.nixarr.openssh.expose.vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+2
View File
@@ -20,12 +20,14 @@ in {
type = types.path;
default = "${nixarr.stateDir}/prowlarr";
defaultText = literalExpression ''"''${nixarr.stateDir}/prowlarr"'';
example = "/home/user/.local/share/nixarr/prowlarr";
description = "The state directory for Prowlarr.";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+2
View File
@@ -16,12 +16,14 @@ in {
type = types.path;
default = "${nixarr.stateDir}/radarr";
defaultText = literalExpression ''"''${nixarr.stateDir}/radarr"'';
example = "/home/user/.local/share/nixarr/radarr";
description = "The state directory for radarr.";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+2
View File
@@ -14,12 +14,14 @@ in {
type = types.path;
default = "${nixarr.stateDir}/readarr";
defaultText = literalExpression ''"''${nixarr.stateDir}/readarr"'';
example = "/home/user/.local/share/nixarr/readarr";
description = "The state directory for Readarr";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+2
View File
@@ -20,12 +20,14 @@ in {
type = types.path;
default = "${nixarr.stateDir}/sonarr";
defaultText = literalExpression ''"''${nixarr.stateDir}/sonarr"'';
example = "/home/user/.local/share/nixarr/sonarr";
description = "The state directory for Sonarr.";
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
+12 -12
View File
@@ -8,6 +8,7 @@ with lib; let
cfg = config.nixarr.transmission;
nixarr = config.nixarr;
cfg-cross-seed = config.nixarr.transmission.privateTrackers.cross-seed;
downloadDir = "${nixarr.mediaDir}/torrents";
transmissionCrossSeedScript = with builtins; pkgs.writeShellApplication {
name = "transmission-cross-seed-script";
@@ -67,23 +68,16 @@ in {
type = types.path;
default = "${nixarr.stateDir}/transmission";
defaultText = literalExpression ''"''${nixarr.stateDir}/transmission"'';
example = "/home/user/.local/share/nixarr/transmission";
description = ''
The state directory for Transmission.
'';
};
downloadDir = mkOption {
type = types.path;
default = "${nixarr.mediaDir}/torrents";
defaultText = literalExpression ''"''${nixarr.mediaDir}/torrents"'';
description = ''
The directory for Transmission to download to.
'';
};
vpn.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
@@ -97,6 +91,7 @@ in {
disableDhtPex = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Disable pex and dht, which is required for some private trackers.
@@ -112,6 +107,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
**Required options:** [`nixarr.prowlarr.enable`](#nixarr.prowlarr.enable)
@@ -123,6 +119,7 @@ in {
type = types.path;
default = "${nixarr.stateDir}/cross-seed";
defaultText = literalExpression ''"''${nixarr.stateDir}/cross-seed"'';
example = "/home/user/.local/share/nixarr/cross-seed";
description = ''
The state directory for Transmission.
'';
@@ -170,18 +167,21 @@ in {
"trace"
];
default = "warn";
example = "debug";
description = "Sets the message level of transmission.";
};
peerPort = mkOption {
type = types.port;
default = 50000;
example = 12345;
description = "Transmission peer traffic port.";
};
uiPort = mkOption {
type = types.port;
default = 9091;
example = 12345;
description = "Transmission web-UI port.";
};
@@ -277,11 +277,11 @@ in {
openPeerPorts = true;
settings =
{
download-dir = "${nixarr.mediaDir}/torrents";
download-dir = downloadDir;
incomplete-dir-enabled = true;
incomplete-dir = "${nixarr.mediaDir}/torrents/.incomplete";
incomplete-dir = "${downloadDir}/.incomplete";
watch-dir-enabled = true;
watch-dir = "${nixarr.mediaDir}/torrents/.watch";
watch-dir = "${downloadDir}/.watch";
rpc-bind-address = if cfg.vpn.enable then "192.168.15.1" else "127.0.0.1";
rpc-port = cfg.uiPort;