Updated docs
This commit is contained in:
@@ -38,12 +38,12 @@ To run services through a VPN, you must provide a wg-quick config file,
|
|||||||
that is provided by most VPN providers:
|
that is provided by most VPN providers:
|
||||||
|
|
||||||
```nix {.numberLines}
|
```nix {.numberLines}
|
||||||
nixarr.vpn = {
|
nixarr.vpn = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# IMPORTANT: This file must _not_ be in the config git directory
|
# IMPORTANT: This file must _not_ be in the config git directory
|
||||||
# You can usually get this wireguard file from your VPN provider
|
# You can usually get this wireguard file from your VPN provider
|
||||||
wgConf = "/data/.secret/wg.conf";
|
wgConf = "/data/.secret/wg.conf";
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
It is possible, _but not recommended_, to run the "*Arrs" behind a VPN,
|
It is possible, _but not recommended_, to run the "*Arrs" behind a VPN,
|
||||||
@@ -64,7 +64,7 @@ If you want to know how to setup DDNS with Njalla, or how to manage secrets in n
|
|||||||
To use this module, add it to your flake inputs in your nix flake file, like shown in this example flake:
|
To use this module, add it to your flake inputs in your nix flake file, like shown in this example flake:
|
||||||
|
|
||||||
```nix {.numberLines}
|
```nix {.numberLines}
|
||||||
{
|
{
|
||||||
description = "Your nix flake";
|
description = "Your nix flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -90,7 +90,7 @@ To use this module, add it to your flake inputs in your nix flake file, like sho
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
@@ -102,7 +102,7 @@ This example does the following:
|
|||||||
- Runs all "*Arrs" supported by this module
|
- Runs all "*Arrs" supported by this module
|
||||||
|
|
||||||
```nix {.numberLines}
|
```nix {.numberLines}
|
||||||
nixarr = {
|
nixarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# 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
|
||||||
@@ -140,7 +140,7 @@ nixarr = {
|
|||||||
prowlarr.enable = true;
|
prowlarr.enable = true;
|
||||||
readarr.enable = true;
|
readarr.enable = true;
|
||||||
lidarr.enable = true;
|
lidarr.enable = true;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Another example where port forwarding is not an option. This is useful if,
|
Another example where port forwarding is not an option. This is useful if,
|
||||||
@@ -153,7 +153,7 @@ example does the following:
|
|||||||
- Runs all the supported "*Arrs"
|
- Runs all the supported "*Arrs"
|
||||||
|
|
||||||
```nix {.numberLines}
|
```nix {.numberLines}
|
||||||
nixarr = {
|
nixarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
vpn = {
|
vpn = {
|
||||||
@@ -176,7 +176,7 @@ nixarr = {
|
|||||||
# Setup SSH service that runs through VPN.
|
# Setup SSH service that runs through VPN.
|
||||||
# Lets you connect through ssh from the internet without having access to
|
# Lets you connect through ssh from the internet without having access to
|
||||||
# port forwarding
|
# port forwarding
|
||||||
openssh.vpn.enable = true;
|
openssh.expose.vpn.enable = true;
|
||||||
|
|
||||||
transmission = {
|
transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -189,20 +189,20 @@ nixarr = {
|
|||||||
prowlarr.enable = true;
|
prowlarr.enable = true;
|
||||||
readarr.enable = true;
|
readarr.enable = true;
|
||||||
lidarr.enable = true;
|
lidarr.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# The `openssh.vpn.enable` option does not enable openssh, so we do that here:
|
# The `openssh.vpn.enable` option does not enable openssh, so we do that here:
|
||||||
# We disable password authentication as it's generally insecure.
|
# We disable password authentication as it's generally insecure.
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = false;
|
||||||
# Get this port from your VPN provider
|
# Get this port from your VPN provider
|
||||||
ports = [ 54321 ]
|
ports = [ 54321 ]
|
||||||
};
|
};
|
||||||
# Adds your public keys as trusted devices
|
# Adds your public keys as trusted devices
|
||||||
users.extraUsers.username.openssh.authorizedKeys.keyFiles = [
|
users.extraUsers.username.openssh.authorizedKeys.keyFiles = [
|
||||||
./path/to/public/key/machine.pub}
|
./path/to/public/key/machine.pub}
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
In both examples, you don't have access to the "*Arrs" or torrent client
|
In both examples, you don't have access to the "*Arrs" or torrent client
|
||||||
@@ -210,7 +210,7 @@ without being on your home network or accessing them through localhost. If
|
|||||||
you have SSH setup you can use SSH tunneling. Simply run:
|
you have SSH setup you can use SSH tunneling. Simply run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ssh -N user@ip \
|
ssh -N user@ip \
|
||||||
-L 6001:localhost:9091 \
|
-L 6001:localhost:9091 \
|
||||||
-L 6002:localhost:9696 \
|
-L 6002:localhost:9696 \
|
||||||
-L 6003:localhost:8989 \
|
-L 6003:localhost:8989 \
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
-- pandoc_indent_nix_blocks.lua
|
||||||
|
-- This Pandoc Lua filter indents all lines in code blocks by 2 spaces
|
||||||
|
-- TODO: This indents _all_ code blocks, not just example and default...
|
||||||
|
|
||||||
|
--if dump_debug then
|
||||||
|
-- local debug_file = io.open("pandoc_debug.log", "a")
|
||||||
|
--end
|
||||||
|
--
|
||||||
|
--function debug(msg)
|
||||||
|
-- if debug_file then
|
||||||
|
-- debug_file:write(msg .. "\n")
|
||||||
|
-- end
|
||||||
|
--end
|
||||||
|
|
||||||
|
function CodeBlock(block)
|
||||||
|
-- Check if the code block language is unmarked
|
||||||
|
if #block.classes == 0 then
|
||||||
|
-- Split the block text into lines
|
||||||
|
local lines = {}
|
||||||
|
for line in block.text:gmatch("[^\r\n]+") do
|
||||||
|
table.insert(lines, line)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Indent each line by 2 spaces
|
||||||
|
for i, line in ipairs(lines) do
|
||||||
|
lines[i] = " " .. line
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Join the lines back together and update the block text
|
||||||
|
block.text = table.concat(lines, '\n')
|
||||||
|
|
||||||
|
-- Return the modified block
|
||||||
|
return block
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{CodeBlock = CodeBlock}
|
||||||
|
}
|
||||||
+17
-12
@@ -53,10 +53,26 @@ in
|
|||||||
"$file_path"
|
"$file_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Make home page
|
||||||
|
pandoc \
|
||||||
|
--metadata date="$(date -u '+%Y-%m-%d - %H:%M:%S %Z')" \
|
||||||
|
--standalone \
|
||||||
|
--highlight-style docs/pandoc/gruvbox.theme \
|
||||||
|
--template docs/pandoc/template.html \
|
||||||
|
--css docs/pandoc/style.css \
|
||||||
|
-V lang=en \
|
||||||
|
-V --mathjax \
|
||||||
|
-f markdown+smart \
|
||||||
|
-o $out/index.html \
|
||||||
|
README.md
|
||||||
|
|
||||||
|
# Make wiki pages
|
||||||
find docs/wiki -type f -name "*.md" | while IFS= read -r file; do
|
find docs/wiki -type f -name "*.md" | while IFS= read -r file; do
|
||||||
buildwiki "$file"
|
buildwiki "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Make options
|
||||||
|
cd $out
|
||||||
pandoc \
|
pandoc \
|
||||||
--standalone \
|
--standalone \
|
||||||
--metadata title="Nixarr - Option Documentation" \
|
--metadata title="Nixarr - Option Documentation" \
|
||||||
@@ -64,6 +80,7 @@ in
|
|||||||
--highlight-style docs/pandoc/gruvbox.theme \
|
--highlight-style docs/pandoc/gruvbox.theme \
|
||||||
--template docs/pandoc/template.html \
|
--template docs/pandoc/template.html \
|
||||||
--css docs/pandoc/style.css \
|
--css docs/pandoc/style.css \
|
||||||
|
--lua-filter docs/pandoc/lua/indent-code-blocks.lua \
|
||||||
--lua-filter docs/pandoc/lua/anchor-links.lua \
|
--lua-filter docs/pandoc/lua/anchor-links.lua \
|
||||||
--lua-filter docs/pandoc/lua/code-default-to-nix.lua \
|
--lua-filter docs/pandoc/lua/code-default-to-nix.lua \
|
||||||
--lua-filter docs/pandoc/lua/remove-utils.lua \
|
--lua-filter docs/pandoc/lua/remove-utils.lua \
|
||||||
@@ -76,17 +93,5 @@ in
|
|||||||
-f markdown+smart \
|
-f markdown+smart \
|
||||||
-o $out/options.html \
|
-o $out/options.html \
|
||||||
"$tmpdir"/nixos-options.md
|
"$tmpdir"/nixos-options.md
|
||||||
|
|
||||||
pandoc \
|
|
||||||
--metadata date="$(date -u '+%Y-%m-%d - %H:%M:%S %Z')" \
|
|
||||||
--standalone \
|
|
||||||
--highlight-style docs/pandoc/gruvbox.theme \
|
|
||||||
--template docs/pandoc/template.html \
|
|
||||||
--css docs/pandoc/style.css \
|
|
||||||
-V lang=en \
|
|
||||||
-V --mathjax \
|
|
||||||
-f markdown+smart \
|
|
||||||
-o $out/index.html \
|
|
||||||
README.md
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user