diff --git a/nixarr/ddns/default.nix b/nixarr/ddns/default.nix index 3a3c18d..bb4a75c 100644 --- a/nixarr/ddns/default.nix +++ b/nixarr/ddns/default.nix @@ -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. diff --git a/nixarr/jellyfin/default.nix b/nixarr/jellyfin/default.nix index 2b5cb69..d92f888 100644 --- a/nixarr/jellyfin/default.nix +++ b/nixarr/jellyfin/default.nix @@ -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."; }; }; diff --git a/nixarr/lidarr/default.nix b/nixarr/lidarr/default.nix index c4cdc75..2b7cd73 100644 --- a/nixarr/lidarr/default.nix +++ b/nixarr/lidarr/default.nix @@ -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) diff --git a/nixarr/nixarr.nix b/nixarr/nixarr.nix index 82d80ff..a142222 100644 --- a/nixarr/nixarr.nix +++ b/nixarr/nixarr.nix @@ -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; }; }; diff --git a/nixarr/openssh/default.nix b/nixarr/openssh/default.nix index 3bb7415..126782e 100644 --- a/nixarr/openssh/default.nix +++ b/nixarr/openssh/default.nix @@ -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) diff --git a/nixarr/prowlarr/default.nix b/nixarr/prowlarr/default.nix index cdf61ff..a0fa1e5 100644 --- a/nixarr/prowlarr/default.nix +++ b/nixarr/prowlarr/default.nix @@ -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) diff --git a/nixarr/radarr/default.nix b/nixarr/radarr/default.nix index b8dbb06..ebfa84d 100644 --- a/nixarr/radarr/default.nix +++ b/nixarr/radarr/default.nix @@ -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) diff --git a/nixarr/readarr/default.nix b/nixarr/readarr/default.nix index f8265c2..243ddbb 100644 --- a/nixarr/readarr/default.nix +++ b/nixarr/readarr/default.nix @@ -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) diff --git a/nixarr/sonarr/default.nix b/nixarr/sonarr/default.nix index 1edd307..e7bb4ee 100644 --- a/nixarr/sonarr/default.nix +++ b/nixarr/sonarr/default.nix @@ -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) diff --git a/nixarr/transmission/default.nix b/nixarr/transmission/default.nix index 8d5dcf7..d41b39d 100644 --- a/nixarr/transmission/default.nix +++ b/nixarr/transmission/default.nix @@ -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;