Fixed docs build
This commit is contained in:
@@ -38,10 +38,10 @@ jobs:
|
||||
|
||||
- run: mkdir -p out && cp -r ./result/* out
|
||||
|
||||
- name: Store docs
|
||||
- name: Store website
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docs
|
||||
name: website
|
||||
path: ./out
|
||||
|
||||
deploy-docs:
|
||||
@@ -57,7 +57,8 @@ jobs:
|
||||
- name: Get nix build output
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docs
|
||||
name: website
|
||||
path: './out'
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
-- Adds anchor links to headings with IDs.
|
||||
|
||||
function Header (h)
|
||||
if h.identifier ~= '' then
|
||||
-- an empty link to this header
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
-- This function is called for each CodeBlock element in the document.
|
||||
-- Change each untagged codeblock in the document to a "nix" code block.
|
||||
|
||||
function CodeBlock(block)
|
||||
-- Check if the code block does not have a language specified.
|
||||
if block.classes[1] == nil then
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
-- Changes all level 2 headers to level 3
|
||||
|
||||
function Header(elem)
|
||||
-- Check if the header is of level 2
|
||||
if elem.level == 2 then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- file: remove-declared-by.lua
|
||||
-- Changes "Example" and "Default" section fenced code blocks into "nix" tagged code blocks
|
||||
|
||||
function Para(elem)
|
||||
-- Check if the first element of the paragraph is Emph (italic)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- file: remove-declared-by.lua
|
||||
-- Removed "Declared by:" paragraphs. TODO: Make them link to the GH repo instead
|
||||
|
||||
function Para(elem)
|
||||
-- Check if the first element of the paragraph is Emph (italic)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- file: remove-util-nixarr.lua
|
||||
-- Remove junk module.args section of the nix documentation
|
||||
|
||||
-- This function checks if a string starts with a given start string
|
||||
function starts_with(str, start)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- file: remove-util-nixarr.lua
|
||||
-- Remove the "util-nixarr" sections from the docs
|
||||
|
||||
-- This function checks if a string starts with a given start string
|
||||
function starts_with(str, start)
|
||||
|
||||
+5
-7
@@ -23,15 +23,13 @@ in
|
||||
buildInputs = with pkgs; [pandoc];
|
||||
phases = ["unpackPhase" "buildPhase"];
|
||||
buildPhase = ''
|
||||
#tmpdir=$(mktemp -d)
|
||||
tmpdir="$out/debug"
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
mkdir -p $out
|
||||
mkdir -p $tmpdir
|
||||
cp -r docs $out
|
||||
cd $out
|
||||
|
||||
# Generate md docs
|
||||
cat ${optionsDocNixos.optionsCommonMark} > "$tmpdir"/nixos.md
|
||||
cat ${optionsDocNixos.optionsCommonMark} > "$tmpdir"/nixos-options.md
|
||||
|
||||
pandoc \
|
||||
--standalone \
|
||||
@@ -51,7 +49,7 @@ in
|
||||
-V --mathjax \
|
||||
-f markdown+smart \
|
||||
-o $out/options.html \
|
||||
"$tmpdir"/nixos.md
|
||||
"$tmpdir"/nixos-options.md
|
||||
|
||||
pandoc \
|
||||
--metadata date="$(date -u '+%Y-%m-%d - %H:%M:%S %Z')" \
|
||||
@@ -63,6 +61,6 @@ in
|
||||
-V --mathjax \
|
||||
-f markdown+smart \
|
||||
-o $out/index.html \
|
||||
"$tmpdir/index.md"
|
||||
README.md
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -5,25 +5,26 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.util-nixarr.services.prowlarr;
|
||||
cfg = config.util-nixarr.services.cross-seed;
|
||||
#settingsFormat = pkgs.formats.json {};
|
||||
#settingsFile = settingsFormat.generate "settings.json" cfg.settings;
|
||||
cross-seedPkg = import ../../../pkgs/cross-seed { inherit (pkgs) stdenv lib fetchFromGitHub; };
|
||||
in {
|
||||
options = {
|
||||
util-nixarr.services.prowlarr = {
|
||||
util-nixarr.services.cross-seed = {
|
||||
enable = mkEnableOption "cross-seed";
|
||||
|
||||
configFile = mkOption {
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
example = "/var/lib/secrets/cross-seed/settings.js";
|
||||
description = "";
|
||||
description = "cross-seed config file"; # TODO: todo
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/cross-seed";
|
||||
description = "cross-seed dataDir"; # TODO: todo
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
@@ -45,7 +46,7 @@ in {
|
||||
"d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.prowlarr = {
|
||||
systemd.services.cross-seed = {
|
||||
description = "cross-seed";
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
@@ -9,6 +9,20 @@ with lib; let
|
||||
cfg = config.nixarr.transmission;
|
||||
nixarr = config.nixarr;
|
||||
dnsServers = config.lib.vpn.dnsServers;
|
||||
get-indexers = with builtins; pkgs.writeShellApplication {
|
||||
name = "get-indexers";
|
||||
|
||||
runtimeInputs = with pkgs; [ jq yq ];
|
||||
|
||||
text = ''
|
||||
PROWLARR_API_KEY=$(xq '.Config.ApiKey' "${nixarr.prowlarr.stateDir}/config.xml")
|
||||
''
|
||||
+ toJson (
|
||||
map (x:
|
||||
''http://localhost:9696/${toString x}/api?apikey="$PROWLARR_API_KEY"''
|
||||
) cfg.privateTrackers.cross-seed.indexIds
|
||||
);
|
||||
};
|
||||
in {
|
||||
options.nixarr.transmission = {
|
||||
enable = mkEnableOption "the Transmission service.";
|
||||
@@ -63,6 +77,13 @@ in {
|
||||
Enable the cross-seed service.
|
||||
'';
|
||||
};
|
||||
indexIds = mkOption {
|
||||
type = with types; listOf int;
|
||||
default = [];
|
||||
description = ''
|
||||
list of indexers TODO: todo
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user