From 266080b197062ccac836d4186abc8f6e76ecf76b Mon Sep 17 00:00:00 2001 From: technofab Date: Mon, 15 Sep 2025 10:53:39 +0200 Subject: [PATCH] chore: update nixmkdocs, add treefmt --- nix/repo/devShells.nix | 12 ++++++++++-- nix/repo/docs.nix | 17 ++++++++--------- nix/repo/flake.lock | 41 +++++++++++++++++++++-------------------- nix/repo/flake.nix | 11 ++++++----- 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/nix/repo/devShells.nix b/nix/repo/devShells.nix index e8ce627..cea93ea 100644 --- a/nix/repo/devShells.nix +++ b/nix/repo/devShells.nix @@ -1,9 +1,17 @@ {inputs, ...}: let - inherit (inputs) pkgs devshell; + inherit (inputs) pkgs devshell treefmt; in { default = devshell.mkShell { packages = [ - pkgs.alejandra + pkgs.nil + (treefmt.mkWrapper pkgs { + programs = { + alejandra.enable = true; + statix.enable = true; + deadnix.enable = true; + mdformat.enable = true; + }; + }) ]; env."HELLO".value = "world!"; enterShellCommands.test = { diff --git a/nix/repo/docs.nix b/nix/repo/docs.nix index ca5296d..1b327a5 100644 --- a/nix/repo/docs.nix +++ b/nix/repo/docs.nix @@ -1,15 +1,14 @@ {inputs, ...}: let inherit (inputs) pkgs devshell doclib; - roots = [ - { - url = "https://gitlab.com/rensa-nix/devshell/-/blob/main/lib"; - path = "${inputs.self}/lib"; - } - ]; optionsDoc = doclib.mkOptionDocs { module = devshell.modules; - inherit roots; + roots = [ + { + url = "https://gitlab.com/rensa-nix/devshell/-/blob/main/lib"; + path = "${inputs.self}/lib"; + } + ]; }; optionsDocs = pkgs.runCommand "options-docs" {} '' mkdir -p $out @@ -27,9 +26,9 @@ in accent = "blue"; }; umami = { - enable = false; + enable = true; src = "https://analytics.tf/umami"; - siteId = ""; + siteId = "8f6d1692-a0e9-4a99-85cc-22fb38e1c82b"; domains = ["devshell.rensa.projects.tf"]; }; }; diff --git a/nix/repo/flake.lock b/nix/repo/flake.lock index 8dce752..9b28e91 100644 --- a/nix/repo/flake.lock +++ b/nix/repo/flake.lock @@ -1,28 +1,13 @@ { "nodes": { - "mkdocs-material-umami": { - "locked": { - "lastModified": 1745840856, - "narHash": "sha256-1Ad1JTMQMP6YsoIKAA+SBCE15qWrYkGue9/lXOLnu9I=", - "owner": "technofab", - "repo": "mkdocs-material-umami", - "rev": "3ac9b194450f6b779c37b8d16fec640198e5cd0a", - "type": "gitlab" - }, - "original": { - "owner": "technofab", - "repo": "mkdocs-material-umami", - "type": "gitlab" - } - }, "nixmkdocs": { "locked": { "dir": "lib", - "lastModified": 1755783537, - "narHash": "sha256-78lWSC3UzkpWYsnyncqbrE37gEIWLzejOeDyoBb6h5o=", + "lastModified": 1755785622, + "narHash": "sha256-xBb9PCkszmrWSEqUiPC7oBJABm1thF572S5QHtloZ+M=", "owner": "TECHNOFAB", "repo": "nixmkdocs", - "rev": "4fd5a351c54e005c4e8df7e23a8e4eec9d3b8cd1", + "rev": "61da605a9bff12f66c4b743f43aea59ca200f533", "type": "gitlab" }, "original": { @@ -51,9 +36,25 @@ }, "root": { "inputs": { - "mkdocs-material-umami": "mkdocs-material-umami", "nixmkdocs": "nixmkdocs", - "nixtest-lib": "nixtest-lib" + "nixtest-lib": "nixtest-lib", + "treefmt-nix": "treefmt-nix" + } + }, + "treefmt-nix": { + "flake": false, + "locked": { + "lastModified": 1756662192, + "narHash": "sha256-F1oFfV51AE259I85av+MAia221XwMHCOtZCMcZLK2Jk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "1aabc6c05ccbcbf4a635fb7a90400e44282f61c4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" } } }, diff --git a/nix/repo/flake.nix b/nix/repo/flake.nix index de3613b..756cc1d 100644 --- a/nix/repo/flake.nix +++ b/nix/repo/flake.nix @@ -2,16 +2,17 @@ inputs = { nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?dir=lib"; nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib"; - mkdocs-material-umami.url = "gitlab:technofab/mkdocs-material-umami"; + treefmt-nix = { + url = "github:numtide/treefmt-nix"; + flake = false; + }; }; outputs = i: i // { ntlib = i.nixtest-lib.lib {inherit (i.parent) pkgs;}; - doclib = i.nixmkdocs.lib { - inherit (i.parent) pkgs; - inherit (i.parent.pkgs) lib; - }; + doclib = i.nixmkdocs.lib {inherit (i.parent) pkgs;}; devshell = import "${i.parent.self}/lib" {inherit (i.parent) pkgs;}; + treefmt = import i.treefmt-nix; }; }