mirror of
https://gitlab.com/TECHNOFAB/nixible.git
synced 2026-02-02 11:25:08 +01:00
feat: switch from flake-parts and devenv to rensa ecosystem
This commit is contained in:
parent
0a0d354962
commit
dcb87e8c3e
21 changed files with 649 additions and 652 deletions
46
nix/repo/devShells.nix
Normal file
46
nix/repo/devShells.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
inputs,
|
||||
cell,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) pkgs devshell treefmt devtools-lib;
|
||||
inherit (cell) soonix;
|
||||
treefmtWrapper = treefmt.mkWrapper pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
mdformat.enable = true;
|
||||
};
|
||||
settings.formatter.mdformat.command = let
|
||||
pkg = pkgs.python3.withPackages (p: [
|
||||
p.mdformat
|
||||
p.mdformat-mkdocs
|
||||
]);
|
||||
in "${pkg}/bin/mdformat";
|
||||
};
|
||||
in {
|
||||
default = devshell.mkShell {
|
||||
imports = [soonix.devshellModule devtools-lib.devshellModule];
|
||||
packages = [
|
||||
treefmtWrapper
|
||||
];
|
||||
lefthook.config = {
|
||||
"pre-commit" = {
|
||||
parallel = true;
|
||||
jobs = [
|
||||
{
|
||||
name = "treefmt";
|
||||
stage_fixed = true;
|
||||
run = "${treefmtWrapper}/bin/treefmt";
|
||||
env.TERM = "dumb";
|
||||
}
|
||||
{
|
||||
name = "soonix";
|
||||
stage_fixed = true;
|
||||
run = "nix run .#soonix:update";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue