chore: add treefmt

This commit is contained in:
technofab 2025-08-28 09:06:24 +02:00
parent 2e25d42c85
commit 1246175082
No known key found for this signature in database
4 changed files with 41 additions and 9 deletions

View file

@ -1,9 +1,9 @@
# Soonix
Soonix helps you declaratively manage configuration files, build scripts, etc. using the Nix module system.
Soonix helps you declaratively manage configuration files, build scripts, etc. using the Nix module system.
It minimizes configuration clutter and provides shell hooks for automatic file management.
Heavily based on and inspired by [Nixago](https://github.com/nix-community/nixago), thus the name (ago <-> soon, if that wasn't obvious).
Heavily based on and inspired by [Nixago](https://github.com/nix-community/nixago), thus the name (ago \<-> soon, if that wasn't obvious).
## Features

View file

@ -1,11 +1,21 @@
{inputs, ...}: let
inherit (inputs) pkgs devshell soonix;
{
cell,
inputs,
...
}: let
inherit (inputs) pkgs devshell soonix treefmt;
in {
default = devshell.mkShell {
imports = [soonix.devshellModule];
packages = [
pkgs.alejandra
pkgs.nil
(treefmt.mkWrapper pkgs {
programs = {
alejandra.enable = true;
mdformat.enable = true;
};
})
];
soonix.hooks.test = {

23
nix/repo/flake.lock generated
View file

@ -17,7 +17,7 @@
"type": "gitlab"
}
},
"nixmkdocs": {
"nixmkdocs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1755785622,
@ -54,8 +54,25 @@
"root": {
"inputs": {
"devshell-lib": "devshell-lib",
"nixmkdocs": "nixmkdocs",
"nixtest-lib": "nixtest-lib"
"nixmkdocs-lib": "nixmkdocs-lib",
"nixtest-lib": "nixtest-lib",
"treefmt-nix": "treefmt-nix"
}
},
"treefmt-nix": {
"flake": false,
"locked": {
"lastModified": 1755934250,
"narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},

View file

@ -2,14 +2,19 @@
inputs = {
devshell-lib.url = "gitlab:rensa-nix/devshell?dir=lib";
nixtest-lib.url = "gitlab:TECHNOFAB/nixtest?dir=lib";
nixmkdocs.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib";
nixmkdocs-lib.url = "gitlab:TECHNOFAB/nixmkdocs?dir=lib";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
flake = false;
};
};
outputs = i:
i
// {
ntlib = i.nixtest-lib.lib {inherit (i.parent) pkgs;};
devshell = i.devshell-lib.lib {inherit (i.parent) pkgs;};
doclib = i.nixmkdocs.lib {inherit (i.parent) pkgs;};
doclib = i.nixmkdocs-lib.lib {inherit (i.parent) pkgs;};
soonix = import "${i.parent.self}/lib" {inherit (i.parent) pkgs;};
treefmt = import i.treefmt-nix;
};
}