diff --git a/README.md b/README.md index 9ba1acd..3e95605 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# Nixarr - ![Logo](./docs/img/logo-2.png) This is a Nixos module that aims to make the installation and management of diff --git a/docs/pandoc/gruvbox.theme b/docs/pandoc/gruvbox.theme deleted file mode 100644 index 9a6d053..0000000 --- a/docs/pandoc/gruvbox.theme +++ /dev/null @@ -1,225 +0,0 @@ -{ - "text-color": "#282828", - "background-color": "#fbf1c7", - "line-number-color": "#3c3836", - "line-number-background-color": "#fbf1c7", - "text-styles": { - "Alert": { - "text-color": "#9d0006", - "background-color": null, - "bold": true, - "italic": false, - "underline": false - }, - "Annotation": { - "text-color": "#b16286", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Attribute": { - "text-color": "#076678", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "BaseN": { - "text-color": "#b57614", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "BuiltIn": { - "text-color": "#8f3f71", - "background-color": null, - "bold": true, - "italic": false, - "underline": false - }, - "Char": { - "text-color": "#98971a", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Comment": { - "text-color": "#7c6f64", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "CommentVar": { - "text-color": "#7c6f64", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Constant": { - "text-color": "#cc241d", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "ControlFlow": { - "text-color": "#282828", - "background-color": null, - "bold": true, - "italic": false, - "underline": false - }, - "DataType": { - "text-color": "#458588", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "DecVal": { - "text-color": "#458588", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Documentation": { - "text-color": "#98971a", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Error": { - "text-color": "#9d0006", - "background-color": null, - "bold": false, - "italic": false, - "underline": true - }, - "Extension": { - "text-color": "#458588", - "background-color": null, - "bold": true, - "italic": false, - "underline": false - }, - "Float": { - "text-color": "#b57614", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Function": { - "text-color": "#b16286", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Import": { - "text-color": "#d65d0e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Information": { - "text-color": "#d65d0e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Keyword": { - "text-color": "#282828", - "background-color": null, - "bold": true, - "italic": false, - "underline": false - }, - "Normal": { - "text-color": "#282828", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Operator": { - "text-color": "#282828", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Other": { - "text-color": "#79740e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Preprocessor": { - "text-color": "#79740e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "RegionMarker": { - "text-color": "#076678", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "SpecialChar": { - "text-color": "#79740e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "SpecialString": { - "text-color": "#79740e", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "String": { - "text-color": "#98971a", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Variable": { - "text-color": "#076678", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "VerbatimString": { - "text-color": "#9d0006", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - }, - "Warning": { - "text-color": "#b57614", - "background-color": null, - "bold": false, - "italic": false, - "underline": false - } - } -} diff --git a/docs/pandoc/inline-code-style.css b/docs/pandoc/inline-code-style.css deleted file mode 100644 index cdcae1e..0000000 --- a/docs/pandoc/inline-code-style.css +++ /dev/null @@ -1,6 +0,0 @@ -code { - background-color: var(--bg); - border-radius: 5em / 10em; - padding-left: 0.3em; - padding-right: 0.3em; -} diff --git a/docs/pandoc/link.svg b/docs/pandoc/link.svg deleted file mode 100644 index c66ac2d..0000000 --- a/docs/pandoc/link.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/pandoc/lua/anchor-links.lua b/docs/pandoc/lua/anchor-links.lua deleted file mode 100644 index e133da0..0000000 --- a/docs/pandoc/lua/anchor-links.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Adds anchor links to headings with IDs. - -function Header (h) - if h.identifier ~= '' then - -- an empty link to this header - local anchor_link = pandoc.Link( - {}, -- content - '#' .. h.identifier, -- href - '', -- title - {class = 'anchor', ['aria-hidden'] = 'true'} -- attributes - ) - h.content:insert(1, anchor_link) - return h - end -end diff --git a/docs/pandoc/lua/code-default-to-nix.lua b/docs/pandoc/lua/code-default-to-nix.lua deleted file mode 100644 index 5743054..0000000 --- a/docs/pandoc/lua/code-default-to-nix.lua +++ /dev/null @@ -1,10 +0,0 @@ --- 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 - -- Set the language of the code block to "nix". - block.classes[1] = "nix" - end - return block -end diff --git a/docs/pandoc/lua/headers-lvl2-to-lvl3.lua b/docs/pandoc/lua/headers-lvl2-to-lvl3.lua deleted file mode 100644 index ab5fdab..0000000 --- a/docs/pandoc/lua/headers-lvl2-to-lvl3.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Changes all level 2 headers to level 3 - -function Header(elem) - -- Check if the header is of level 2 - if elem.level == 2 then - -- Change the header level to 3 - elem.level = 3 - end - return elem -end diff --git a/docs/pandoc/lua/indent-code-blocks.lua b/docs/pandoc/lua/indent-code-blocks.lua deleted file mode 100644 index 2ce9353..0000000 --- a/docs/pandoc/lua/indent-code-blocks.lua +++ /dev/null @@ -1,39 +0,0 @@ --- 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} -} diff --git a/docs/pandoc/lua/inline-to-fenced-nix.lua b/docs/pandoc/lua/inline-to-fenced-nix.lua deleted file mode 100644 index 9e4b470..0000000 --- a/docs/pandoc/lua/inline-to-fenced-nix.lua +++ /dev/null @@ -1,31 +0,0 @@ --- 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) - if #elem.content >= 1 and elem.content[1].t == "Emph" then - -- Convert the first element to plain text to check its content - local firstText = pandoc.utils.stringify(elem.content[1]) - local isExample = firstText:find("^Example:") - local isDefault = firstText:find("^Default:") - - -- Check if the text starts with "Declared by:" - if isExample or isDefault then - local newElems = {} - for i, el in ipairs(elem.content) do - if el.t == "Code" then - -- Convert inline code to fenced code block and add it to new elements - -- Note: This will be outside the paragraph due to block-level constraint - local addedSpaces = string.gsub(el.text, "^", " "); - table.insert(newElems, pandoc.CodeBlock(addedSpaces, pandoc.Attr("", {"nix"}))) - else - -- Keep other elements as inline, to be added to a new paragraph - table.insert(newElems, el) - end - end - -- Replace paragraph with new elements (mixing inline and block-level elements isn't directly possible, so this part needs rethinking) - return newElems - end - end - -- Otherwise, return the paragraph unmodified - return elem -end diff --git a/docs/pandoc/lua/remove-declared-by.lua b/docs/pandoc/lua/remove-declared-by.lua deleted file mode 100644 index 623e4c4..0000000 --- a/docs/pandoc/lua/remove-declared-by.lua +++ /dev/null @@ -1,17 +0,0 @@ --- 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) - if #elem.content >= 1 and elem.content[1].t == "Emph" then - -- Convert the first element to plain text to check its content - local firstText = pandoc.utils.stringify(elem.content[1]) - - -- Check if the text starts with "Declared by:" - if firstText:find("^Declared by:") then - -- Return an empty block to remove this paragraph - return {} - end - end - -- Otherwise, return the paragraph unmodified - return elem -end diff --git a/docs/pandoc/lua/remove-module-args.lua b/docs/pandoc/lua/remove-module-args.lua deleted file mode 100644 index 317bf01..0000000 --- a/docs/pandoc/lua/remove-module-args.lua +++ /dev/null @@ -1,47 +0,0 @@ --- 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) - return str:sub(1, #start) == start -end - --- This recursive function traverses the AST and removes sections based on the header condition -function remove_sections(elements, condition) - local result = {} - local skip_level = nil -- Define skip_level outside the loop, initialized to nil - - for _, el in ipairs(elements) do - if el.t == "Header" then - -- Check if we are currently skipping sections and this header is of equal or higher level - if skip_level and el.level <= skip_level then - skip_level = nil -- Stop skipping sections - end - - -- If skip_level is nil, check if this header starts a new section to skip - if not skip_level and condition(el) then - skip_level = el.level -- Start skipping sections - else - table.insert(result, el) -- Add the header to results if not skipping - end - elseif not skip_level then - table.insert(result, el) -- Add non-header elements if not skipping - end - end - - return result -end - --- The Pandoc filter function to apply our custom logic -function Pandoc(doc) - -- Define the condition function to be used for identifying sections to remove - local condition = function(header) - -- Assuming the header's actual text is in the 'content' array and in the first element - local header_text = pandoc.utils.stringify(header.content) - return starts_with(header_text, "_module.args") - end - - -- Apply the removal function to the document blocks - doc.blocks = remove_sections(doc.blocks, condition) - - return doc -end diff --git a/docs/pandoc/lua/remove-utils.lua b/docs/pandoc/lua/remove-utils.lua deleted file mode 100644 index 3a88290..0000000 --- a/docs/pandoc/lua/remove-utils.lua +++ /dev/null @@ -1,47 +0,0 @@ --- 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) - return str:sub(1, #start) == start -end - --- This recursive function traverses the AST and removes sections based on the header condition -function remove_sections(elements, condition) - local result = {} - local skip_level = nil -- Define skip_level outside the loop, initialized to nil - - for _, el in ipairs(elements) do - if el.t == "Header" then - -- Check if we are currently skipping sections and this header is of equal or higher level - if skip_level and el.level <= skip_level then - skip_level = nil -- Stop skipping sections - end - - -- If skip_level is nil, check if this header starts a new section to skip - if not skip_level and condition(el) then - skip_level = el.level -- Start skipping sections - else - table.insert(result, el) -- Add the header to results if not skipping - end - elseif not skip_level then - table.insert(result, el) -- Add non-header elements if not skipping - end - end - - return result -end - --- The Pandoc filter function to apply our custom logic -function Pandoc(doc) - -- Define the condition function to be used for identifying sections to remove - local condition = function(header) - -- Assuming the header's actual text is in the 'content' array and in the first element - local header_text = pandoc.utils.stringify(header.content) - return starts_with(header_text, "util-nixarr") - end - - -- Apply the removal function to the document blocks - doc.blocks = remove_sections(doc.blocks, condition) - - return doc -end diff --git a/docs/pandoc/script.js b/docs/pandoc/script.js deleted file mode 100644 index d7f1f98..0000000 --- a/docs/pandoc/script.js +++ /dev/null @@ -1,26 +0,0 @@ -addEventListener('DOMContentLoaded', () => { - const fullpath = location.origin + location.pathname.replace(/\/$/, ""); - - document.querySelectorAll('nav a').forEach((el) => { - const url = new URL(el.href); - const fullurl = url.origin + url.pathname.replace(/\/$/, ""); - const onHome = fullpath === location.origin - const urlIsHome = fullurl === location.origin - - //console.log("fullurl", fullurl); - //console.log("fullpath", fullpath); - //console.log("locationpathname", location.pathname); - //console.log("urlpathname", url.pathname); - //console.log("onhome", onHome); - //console.log("urlIsHome", urlIsHome); - //console.log("") - - if (onHome && fullurl === fullpath) { - el.classList.add('active'); - } - // The startsWith is for subpages - else if (!urlIsHome && fullpath.startsWith(fullurl)) { - el.classList.add('active'); - } - }); -}); diff --git a/docs/pandoc/style.css b/docs/pandoc/style.css deleted file mode 100644 index c7f451c..0000000 --- a/docs/pandoc/style.css +++ /dev/null @@ -1,461 +0,0 @@ -/* - * I add this to html files generated with pandoc. - */ - -:root { - --bg: #fbf1c7; - --bgt: #fbf1c7; - --bge: #fbf8e4; - --bg0: #f9f5d7; - --fg0: #282828; - --ltred: #cc241d; - --ltgreen: #98971a; - --ltyellow: #d79921; - --ltblue: #458588; - --ltpurple: #b16286; - --ltaqua: #689da6; - --ltorange: #d65d0e; - --ltgrey: #7c6f64; - --dkred: #9d0006; - --dkgreen: #79740e; - --dkyellow: #b57614; - --dkblue: #076678; - --dkpurple: #8f3f71; - --dkaqua: #427b58; - --dkgrey: #3c3836; -} - -html { - /* font-size: 100%; */ - /* overflow-y: scroll; */ - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -body { - color: var(--fg0); - font-family: century_supra_a, Georgia, serif; - font-size: 16px; - line-height: 1.7; - background: var(--bge); - margin: 0; -} - -main { - min-height: 100vh; - position: relative; -} - -#header { - background-color: #066678; - padding: 0.3rem 0; - color: #faf8e4; - border-bottom: 1px solid #458587; - font-size: 2rem; -} - -nav { - color: #faf8e4; - background-color: #054c5a; -} - -nav .content { - display: flex; - padding: 0; -} - -nav a { - color: #458587; - text-decoration: none; - font-size: 1em; - padding: 0.15em 1em; -} - -nav a:visited { - color: #458587; -} - -nav a:hover { - background-color: var(--dkblue); - color: var(--bg); -} - -nav a.active { - background-color: #458587; - color: #faf8e4 !important; -} - -footer { - height: 2rem; - position: absolute; - bottom: 0; - width: 100%; - background-color: #03333b; - border-top: 0.5rem solid #458587; - color: #faf8e4; - display: flex; - font-size: 0.8rem; -} - -footer .content { - display: flex; - align-items: center; - gap: 1em; - height: 100%; -} - -.content { - margin: auto; - padding: 0 0.5rem; - max-width: 50rem; -} - -.content-wrap { - padding-bottom: 4rem; - overflow-wrap: break-word; -} - -a { - color: var(--ltblue); - text-decoration: none; -} - -a:visited { - color: var(--dkblue); -} - -a:hover { - color: var(--ltblue); -} - -a:active { - color: var(--ltblue); -} - -a:focus { - outline: thin dotted; -} - -a code { - text-decoration-line: underline; -} - -strong a { - text-decoration-line: underline; - color: var(--fg0); -} - -strong a:hover { - text-decoration-line: underline; - color: var(--fg0); -} - -strong a:visited { - text-decoration-line: underline; - color: var(--fg0); -} - -*::-moz-selection { - /* background: var(--ltred); */ - background: rgba(255, 255, 0, 0.3); - color: var(--fg0); -} - -*::selection { - background: rgba(255, 255, 0, 0.3); - color: var(--fg0); -} - -a::-moz-selection { - background: rgba(255, 255, 0, 0.3); - color: var(--ltblue); -} - -a::selection { - background: rgba(255, 255, 0, 0.3); - color: var(--ltblue); -} - -p { - margin: 1em 0; -} - -img { - max-width: 100%; -} - -h1, h2, h3, h4, h5, h6 { - color: var(--fg0); - line-height: 125%; - /* margin-top: 1em; */ - font-weight: normal; -} - -h4, h5, h6 { - font-weight: bold; -} - -h1 { - font-size: 2.25em; -} - -h2 { - font-size: 2em; -} - -h3 { - font-size: 1.5em; -} - -h4 { - font-size: 1.2em; -} - -h5 { - font-size: 1em; -} - -h6 { - font-size: 0.9em; -} - -blockquote { - color: var(--ltgrey); - margin: 0; - padding-left: 3em; - border-left: 0.5em var(--fg0) solid; -} - -hr { - display: block; - height: 2px; - border: 0; - border-top: 1px solid #aaa; - border-bottom: 1px solid #eee; - margin: 1em 0; - padding: 0; -} - -pre, code, kbd, samp { - color: var(--fg0); - font-family: monospace, monospace; - _font-family: 'courier new', monospace; - font-size: 0.98em; -} - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -b, strong { - font-weight: bold; -} - -dfn { - font-style: italic; -} - -ins { - background: #ff9; - color: #000; - text-decoration: none; -} - -mark { - background: #ff0; - color: #000; - font-style: italic; - font-weight: bold; -} - -sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -ul, ol { - margin: 1em 0; - padding: 0 0 0 2em; -} - -li p:last-child { - margin-bottom: 0; -} - -ul ul, ol ol { - margin: .3em 0; -} - -dl { - margin-bottom: 1em; -} - -dt { - font-weight: bold; - margin-bottom: .8em; -} - -dd { - margin: 0 0 .8em 2em; -} - -dd:last-child { - margin-bottom: 0; -} - -img { - border: 0; - -ms-interpolation-mode: bicubic; - vertical-align: middle; -} - -figure { - display: block; - text-align: center; - margin: 1em 0; -} - -figure img { - border: none; - margin: 0 auto; -} - -figcaption { - font-size: 0.8em; - font-style: italic; - margin: 0 0 .8em; -} - -table { - margin-bottom: 2em; - border-bottom: 1px solid #ddd; - border-right: 1px solid #ddd; - border-spacing: 0; - border-collapse: collapse; -} - -table th { - padding: .2em 1em; - background-color: #eee; - border-top: 1px solid #ddd; - border-left: 1px solid #ddd; -} - -table td { - padding: .2em 1em; - border-top: 1px solid #ddd; - border-left: 1px solid #ddd; - vertical-align: top; -} - -.author { - font-size: 1.2em; - text-align: center; -} - -@media print { - * { - background: transparent !important; - color: black !important; - filter: none !important; - -ms-filter: none !important; - } - - body { - font-size: 12pt; - } - - .content { - max-width: 100%; - } - - - a, a:visited { - text-decoration: underline; - } - - hr { - height: 1px; - border: 0; - border-bottom: 1px solid black; - } - - a[href]:after { - content: " (" attr(href) ")"; - } - - abbr[title]:after { - content: " (" attr(title) ")"; - } - - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { - content: ""; - } - - pre, blockquote { - border: 1px solid #999; - padding-right: 1em; - page-break-inside: avoid; - } - - tr, img { - page-break-inside: avoid; - } - - img { - max-width: 100% !important; - } - - @page :left { - margin: 15mm 20mm 15mm 10mm; -} - - @page :right { - margin: 15mm 10mm 15mm 20mm; -} - - p, h2, h3 { - orphans: 3; - widows: 3; - } - - h2, h3 { - page-break-after: avoid; - } -} - -/* show the anchor links in headings if one hovers over the heading. */ -.anchor::before { - content: url("/docs/pandoc/link.svg"); - display: inline-block; - font-size: 1em; - left: -1.5em; - line-height: 1.5; - opacity: 0.15; - position: relative; - width: 0em; -} -.anchor:hover { - text-decoration: none; -} -h1:hover > .anchor::before, -h2:hover > .anchor::before, -h3:hover > .anchor::before, -h4:hover > .anchor::before, -h5:hover > .anchor::before, -h6:hover > .anchor::before { - opacity: 1; -} -/* end: heading anchor links */ diff --git a/docs/pandoc/template.html b/docs/pandoc/template.html deleted file mode 100644 index 4105036..0000000 --- a/docs/pandoc/template.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - $for(author-meta)$ - - $endfor$ - $if(date-meta)$ - - $endif$ - $if(keywords)$ - - $endif$ - $if(description-meta)$ - - $endif$ - $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ - - $for(css)$ - - $endfor$ - $for(header-includes)$ - $header-includes$ - $endfor$ - $if(math)$ - $if(mathjax)$ - - $endif$ - $math$ - $endif$ - - - - - -
- - -
- $for(include-before)$ - $include-before$ - $endfor$ - $if(title)$ -
-

$title$

- $if(subtitle)$ -

$subtitle$

- $endif$ - $for(author)$ -

$author$

- $endfor$ - $if(abstract)$ -
-
$abstract-title$
- $abstract$ -
- $endif$ -
- $endif$ - $if(toc)$ - - $endif$ - $body$ - $for(include-after)$ - $include-after$ - $endfor$ -
- -
- - - diff --git a/flake.lock b/flake.lock index af23c44..3aecaeb 100644 --- a/flake.lock +++ b/flake.lock @@ -36,7 +36,8 @@ "inputs": { "nixpkgs": "nixpkgs", "nixpkgs-sonarr": "nixpkgs-sonarr", - "vpnconfinement": "vpnconfinement" + "vpnconfinement": "vpnconfinement", + "website-builder": "website-builder" } }, "vpnconfinement": { @@ -53,6 +54,26 @@ "repo": "VPN-Confinement", "type": "github" } + }, + "website-builder": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737498153, + "narHash": "sha256-sLQ8e5MyKMPqiPkkOW3cdNdgyJvTvmnZC8e1YCu1TYg=", + "owner": "rasmus-kirk", + "repo": "website-builder", + "rev": "839d95ce9e52fb93be15272b0870c546275b7b2d", + "type": "github" + }, + "original": { + "owner": "rasmus-kirk", + "repo": "website-builder", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 74fa5b4..69c1ac2 100644 --- a/flake.nix +++ b/flake.nix @@ -6,12 +6,17 @@ nixpkgs-sonarr.url = "github:nixos/nixpkgs/328abff1f7a707dc8da8e802f724f025521793ea"; vpnconfinement.url = "github:Maroka-chan/VPN-Confinement"; + + website-builder.url = "github:rasmus-kirk/website-builder"; + website-builder.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { nixpkgs, nixpkgs-sonarr, vpnconfinement, + website-builder, + self, ... } @ inputs: let # Systems supported @@ -45,8 +50,41 @@ }; }); - packages = forAllSystems ({pkgs}: { - default = pkgs.callPackage ./mkDocs.nix {inherit inputs;}; + packages = forAllSystems ({pkgs}: let + website = website-builder.lib { + pkgs = pkgs; + src = "${self}"; + headerTitle = "Nixarr"; + standalonePages = [{ + title = "Nixarr - Media Server Nixos Module"; + inputFile = ./README.md; + outputFile = "index.html"; + }]; + includedDirs = [ "docs" ]; + articleDirs = [ "docs/wiki" ]; + navbar = [ + { title = "Home"; location = "/"; } + { title = "Options"; location = "/nixos-options"; } + { title = "Wiki"; location = "/wiki"; } + { title = "Github"; location = "https://github.com/rasmus-kirk/nixarr"; } + ]; + favicons = { + # For all browsers + "16x16" = "/docs/img/favicons/16x16.png"; + "32x32" = "/docs/img/favicons/32x32.png"; + # For Google and Android + "48x48" = "/docs/img/favicons/48x48.png"; + "192x192" = "/docs/img/favicons/192x192.png"; + # For iPad + "167x167" = "/docs/img/favicons/167x167.png"; + # For iPhone + "180x180" = "/docs/img/favicons/180x180.png"; + }; + nixosModules = ./nixarr; + }; + in { + default = website.package; + debug = website.loop; }); formatter = forAllSystems ({pkgs}: pkgs.alejandra);