From fad81aa24297e2b00e38c2a8c8ac219bbca0766d Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Sat, 29 Nov 2025 21:43:04 +0200 Subject: [PATCH] feat: init --- .envrc | 1 + .gitignore | 9 +++++++++ config.toml | 36 ++++++++++++++++++++++++++++++++++++ content/_index.md | 3 +++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 35 +++++++++++++++++++++++++++++++++++ justfile | 15 +++++++++++++++ static/css/input.css | 1 + templates/index.html | 25 +++++++++++++++++++++++++ templates/layouts/base.html | 18 ++++++++++++++++++ 10 files changed, 170 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 config.toml create mode 100644 content/_index.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 justfile create mode 100644 static/css/input.css create mode 100644 templates/index.html create mode 100644 templates/layouts/base.html diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..c4b17d7 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6cb1c5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# flake +/.direnv/ +/result + +# zola build +/public/ + +# tailwindcss build +/static/css/style.css diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..30cb08d --- /dev/null +++ b/config.toml @@ -0,0 +1,36 @@ +base_url = "https://dashboard.lab.liljamo.com" +title = "Lab Dashboard" + +ignored_static = ["css/input.css"] + +generate_sitemap = false +generate_robots_txt = false + +[[extra.sections]] +title = "Proxmox" +links = [ + { href = "https://rustylily.loxe.lab.liljamo.com:8006", name = "rustylily" }, + { href = "https://este.loxe.lab.liljamo.com:8006", name = "este" }, + { href = "https://nessa.loxe.lab.liljamo.com:8006", name = "nessa" }, + { subtitle = "Backup" }, + { href = "https://pbs.loxe.lab.liljamo.com:8006", name = "PBS" }, +] + +[[extra.sections]] +title = "Monitoring" +links = [ + { href = "https://metrics.lab.liljamo.com", name = "Grafana" }, + { href = "https://prometheus.metrics.lab.liljamo.com", name = "Prometheus" }, + { href = "https://alertmanager.metrics.lab.liljamo.com", name = "Alertmanager" }, +] + +[[extra.sections]] +title = "Apps" +links = [ + { href = "https://vikunja.cloud.lab.liljamo.com", name = "Vikunja" }, + { href = "https://outline.cloud.lab.liljamo.com", name = "Outline" }, + { href = "https://miniflux.cloud.lab.liljamo.com", name = "Miniflux" }, + { href = "https://umami.oci.lab.liljamo.com", name = "Umami", pub_href = "https://a.liljamo.dev" }, + { href = "https://media.lab.liljamo.com", name = "Jellyfin" }, + { href = "https://cloud.lab.liljamo.com", name = "Nextcloud", pub_href = "https://cloud.liljamo.com" }, +] diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..ef6083b --- /dev/null +++ b/content/_index.md @@ -0,0 +1,3 @@ ++++ +template = "index.html" ++++ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a7520b0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1764384123, + "narHash": "sha256-UoliURDJFaOolycBZYrjzd9Cc66zULEyHqGFH3QHEq0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "59b6c96beacc898566c9be1052ae806f3835f87d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7055bd9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + + outputs = { nixpkgs, ... }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; + + buildInputs = with pkgs; [ + just + + zola + tailwindcss_4 + ]; + in + { + packages.x86_64-linux.default = pkgs.stdenv.mkDerivation { + name = "dashboard-zola"; + src = ./.; + inherit buildInputs; + buildPhase = '' + just build + ''; + installPhase = '' + mkdir -p $out + cp -R public $out + ''; + }; + + devShells.x86_64-linux.default = pkgs.mkShell { + buildInputs = with pkgs; [ + tailwindcss-language-server + ] ++ buildInputs; + }; + }; +} diff --git a/justfile b/justfile new file mode 100644 index 0000000..f54eca5 --- /dev/null +++ b/justfile @@ -0,0 +1,15 @@ +tailwindInput := "./static/css/input.css" +tailwindOutput := "./static/css/style.css" + +_default: + just --list + +build: + tailwindcss -i {{tailwindInput}} -o {{tailwindOutput}} --minify + zola build + +css: + tailwindcss -i {{tailwindInput}} -o {{tailwindOutput}} --watch + +serve: + zola serve diff --git a/static/css/input.css b/static/css/input.css new file mode 100644 index 0000000..d4b5078 --- /dev/null +++ b/static/css/input.css @@ -0,0 +1 @@ +@import 'tailwindcss'; diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..f5d7b4c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,25 @@ +{% extends "layouts/base.html" %} + +{% block content %} +
+ {% for section in config.extra.sections %} +

{{ section.title }}

+
+ {% for link in section.links %} + {% if link.subtitle %} +
+

{{ link.subtitle }}

+
+ {% else %} +
+ {{ link.name }} + {% if link.pub_href %} + (pub) + {% endif %} +
+ {% endif %} + {% endfor %} +
+ {% endfor %} +
+{% endblock content %} diff --git a/templates/layouts/base.html b/templates/layouts/base.html new file mode 100644 index 0000000..6a24e40 --- /dev/null +++ b/templates/layouts/base.html @@ -0,0 +1,18 @@ + + + + + + + {{ config.title }} + + + + +
+
+ {% block content %} {% endblock %} +
+
+ + -- 2.44.1